XML : Deactivate the entire screen except for the FAB menu

It is necessary to realize the screen shading, shadow, clicking on the menu. But the Android-5 and above does not work to apply it to the entire screen. The shadow should cover the entire screen, but TapBar and AppBar not, allows to do it. I get to be realized only in the form: enter image description hereenter image description here

How can I paint over the entire screen? Below is an example of my XML file

      <?xml version="1.0" encoding="utf-8"?>  <android.support.design.widget.CoordinatorLayout      xmlns:android="http://schemas.android.com/apk/res/android"      xmlns:app="http://schemas.android.com/apk/res-auto"      android:orientation="vertical"      android:layout_width="match_parent"      android:layout_height="match_parent"      android:id="@+id/coordinator_layout"      >        <android.support.design.widget.AppBarLayout          android:layout_width="match_parent"          android:layout_height="wrap_content"          android:fitsSystemWindows="true"          android:background="?attr/colorPrimary">          <android.support.design.widget.CollapsingToolbarLayout              android:layout_width="match_parent"              android:layout_height="wrap_content"              app:layout_scrollFlags="scroll|snap"              android:fitsSystemWindows="true">                <android.support.v7.widget.Toolbar                  android:layout_width="match_parent"                  android:layout_height="?attr/actionBarSize"                  android:id="@+id/toolbar"                  app:theme="@style/ThemeOverlay.AppCompat.Dark"                  app:popupTheme="@style/ThemeOverlay.AppCompat.Light"                  android:layout_gravity="top"                  app:layout_collapseMode="parallax"                  android:background="?attr/colorPrimary"                  >                    <LinearLayout                      android:layout_width="wrap_content"                      android:layout_height="wrap_content"                      android:orientation="horizontal"                      android:gravity="center_vertical">                      <com.makeramen.RoundedImageView                          style="@style/AvatarImage"                          android:id="@+id/iv_avatar"/>                        <com.akbars.bankok.views.custom.TextViewFonted                          android:layout_width="wrap_content"                          android:layout_height="wrap_content"                          android:text=""                          android:gravity="center"                          android:textColor="@android:color/white"                          android:textSize="18sp"                          app:customFont="Roboto-Regular.ttf"                          android:id="@+id/tv_balance"/>                        <com.akbars.bankok.views.custom.TextViewFonted                          android:layout_width="wrap_content"                          android:layout_height="wrap_content"                          android:text=""                          android:textAppearance="?android:attr/textAppearanceSmallInverse"                          android:visibility="gone"/>                    </LinearLayout>                  <ProgressBar                      android:layout_width="wrap_content"                      android:layout_height="wrap_content"                      style="?android:attr/progressBarStyleSmall"                      android:id="@+id/progress_bar"                      android:visibility="gone"/>              </android.support.v7.widget.Toolbar>          </android.support.design.widget.CollapsingToolbarLayout>        </android.support.design.widget.AppBarLayout>      <com.akbars.bankok.views.custom.SwipeEnableViewPager          android:layout_width="match_parent"          android:layout_height="match_parent"          android:id="@+id/main_view_pager"          app:layout_behavior="@string/appbar_scrolling_view_behavior"          android:layout_marginBottom="@dimen/tab_bar_layout_height"/>          <android.support.design.widget.TabLayout          android:layout_width="match_parent"          android:layout_height="@dimen/bottom_navigation_tab"          android:id="@+id/tabs"          app:tabMode="fixed"          app:tabIndicatorColor="@android:color/white"          android:layout_gravity="center_horizontal|bottom"          style="@style/MyCustomTabLayout"          android:background="@android:color/white"          android:elevation="10dp"/>        <android.support.design.widget.FloatingActionButton          android:id="@+id/fab"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:layout_gravity="bottom|end"          style="@style/FABButton"          android:src="@drawable/ic_import_export_white_24dp"          app:backgroundTint="?attr/colorPrimary"          />        <include layout="@layout/fab_layout" />        <View          android:layout_width="match_parent"          android:layout_height="match_parent"          android:id="@+id/shadow"          android:background="@color/shadow"          />    </android.support.design.widget.CoordinatorLayout>    

And as fab_layout code:

  <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"           xmlns:app="http://schemas.android.com/apk/res-auto"           android:layout_width="match_parent"           android:layout_height="match_parent"  >      <android.support.design.widget.FloatingActionButton      android:id="@+id/card_transfer_fab"      style="@style/SmallFabButton"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="256dp"      android:src="@drawable/ic_credit_card_white_24dp"      app:backgroundTint="?attr/colorPrimary"      android:visibility="invisible"      app:fabSize="mini"      />    <android.support.v7.widget.CardView      android:id="@+id/card_transfer_card"      style="@style/FABCardText"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="262dp"      android:visibility="invisible"      android:background="@color/white"      >        <com.akbars.bankok.views.custom.TextViewFonted          style="@style/FABText"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="@string/transfer_to_card_menu"          android:textColor="@color/app_text_color_normal"          />  </android.support.v7.widget.CardView>    <android.support.design.widget.FloatingActionButton      android:id="@+id/friend_transfer_fab"      style="@style/SmallFabButton"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="200dp"      android:src="@drawable/ic_face_white_24dp"      android:visibility="invisible"      app:backgroundTint="?attr/colorPrimary"      app:fabSize="mini"      />    <android.support.v7.widget.CardView      android:id="@+id/friend_transfer_card"      style="@style/FABCardText"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="206dp"      android:background="@color/white"      android:visibility="invisible"      >        <com.akbars.bankok.views.custom.TextViewFonted          style="@style/FABText"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="@string/transfer_to_friend_menu"          android:textColor="@color/app_text_color_normal"          />  </android.support.v7.widget.CardView>    <android.support.design.widget.FloatingActionButton      android:id="@+id/request_fab"      style="@style/SmallFabButton"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="144dp"      android:src="@drawable/ic_vertical_align_bottom_white_24dp"      app:backgroundTint="?attr/colorPrimary"      android:visibility="invisible"      app:fabSize="mini"      />    <android.support.v7.widget.CardView      android:id="@+id/request_text_card"      style="@style/FABCardText"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="152dp"      android:visibility="invisible"      android:background="@color/white"      >        <com.akbars.bankok.views.custom.TextViewFonted          style="@style/FABText"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="@string/request"          android:textColor="@color/app_text_color_normal"          />  </android.support.v7.widget.CardView>      <android.support.design.widget.FloatingActionButton      android:id="@+id/transfer_fab"      style="@style/SmallFabButton"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="312dp"      android:src="@drawable/ic_description_white_24dp"      app:backgroundTint="?attr/colorPrimary"      android:visibility="invisible"      app:fabSize="mini"      />    <android.support.v7.widget.CardView      android:id="@+id/request_transfer"      style="@style/FABCardText"      android:layout_width="wrap_content"      android:layout_height="wrap_content"      android:layout_gravity="bottom|end"      android:layout_marginBottom="320dp"      android:background="@color/white"      android:visibility="invisible"      >        <com.akbars.bankok.views.custom.TextViewFonted          style="@style/FABText"          android:layout_width="wrap_content"          android:layout_height="wrap_content"          android:text="@string/transfer_by_requisites_menu"          android:textColor="@color/app_text_color_normal"          />  </android.support.v7.widget.CardView>    

To perform this task, you must use the standard tools, the library will not help, I know that there are, but we need to do without their applications

No comments:

Post a Comment