android - Snackbar hidden by bottom navigation -


my snackbar being hidden bottom navigation buttons.

hidden snackbar

the activity able toggle full screen mode , not want use margins offsets fix this.

my xml layout is:

<framelayout     xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:background="@color/image_background"     tools:context="link.standen.michael.slideshow.imageactivity">      <imageview         android:id="@+id/fullscreen_content"         android:layout_width="match_parent"         android:layout_height="match_parent"         android:gravity="center"         android:keepscreenon="true"         android:contentdescription="@string/image_description"/>      <!-- image details overlay -->     <linearlayout         android:id="@+id/image_details1"         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:layout_gravity="bottom|start"         android:orientation="vertical"         android:visibility="gone"         android:background="@color/black_overlay"         android:padding="@dimen/overlay_padding">          ...      </linearlayout>      <!-- framelayout insets children based on system windows using          android:fitssystemwindows. -->     <framelayout         android:layout_width="match_parent"         android:layout_height="match_parent"         android:fitssystemwindows="true">          <relativelayout             android:id="@+id/fullscreen_content_controls"             android:layout_width="match_parent"             android:layout_height="wrap_content"             tools:ignore="uselessparent">              <linearlayout                 android:id="@+id/fullscreen_content_controls_buttons"                 style="?metabuttonbarstyle"                 android:layout_width="match_parent"                 android:layout_height="wrap_content"                 android:layout_alignparentbottom="true"                 android:layout_centerhorizontal="true"                 android:background="@color/black_overlay"                 android:orientation="horizontal">                  ...             </linearlayout>              <!-- image details overlay -->             <linearlayout                 android:id="@+id/image_details2"                 android:layout_width="wrap_content"                 android:layout_height="wrap_content"                 android:layout_above="@+id/fullscreen_content_controls_buttons"                 android:layout_alignparentstart="true"                 android:orientation="vertical"                 android:background="@color/black_overlay"                 android:padding="@dimen/overlay_padding">               ...              </linearlayout>         </relativelayout>     </framelayout>  </framelayout> 

i've tried positioning snackbar @ various elements on screen seems hide behind bottom navigation buttons when application not in full screen mode.

flags used full screen viewing:

mcontentview.setsystemuivisibility(view.system_ui_flag_low_profile         | view.system_ui_flag_fullscreen         | view.system_ui_flag_layout_stable         | view.system_ui_flag_immersive_sticky         | view.system_ui_flag_layout_hide_navigation         | view.system_ui_flag_hide_navigation); 

what changes need make layout snackbar aligned correctly?

i've found solution.

when application in full screen mode, snackbar attached primary full screen content. r.id.fullscreen_content in case.

when application not in full screen mode, snackbar attached new coorderinatorlayout nested in framelayout android:fitssystemwindows="true".

would nice not have manage this, solution works. let me know if there better.


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -