Anchor Floating action button with bottom bar in Android -


i developing android app. app have action bar @ bottom. - https://github.com/roughike/bottombar. bottom bar animated(show , hide sliding , down) binding recyclerview. want floating button @ bottom right. floating button anchor bottom bar.

this trying achieve enter image description here

but in condition, bottom bar tabs.

this layout xml file

<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     xmlns:app="http://schemas.android.com/apk/res-auto"     android:id="@+id/activity_main"     android:layout_width="match_parent"     android:layout_height="match_parent"     android:fitssystemwindows="true"     tools:context="com.tonightfootball.waiyanhein.tonightfootballreport.mainactivity">       <android.support.design.widget.appbarlayout         android:id="@+id/main_appbar_layout"         android:layout_width="match_parent"         android:theme="@style/themeoverlay.appcompat.dark.actionbar"         android:layout_height="wrap_content">          <android.support.design.widget.collapsingtoolbarlayout             android:id="@+id/collapsing_toolbar"             android:layout_width="match_parent"             android:layout_height="match_parent"             android:fitssystemwindows="true"             app:contentscrim="?attr/colorprimary"              app:layout_scrollflags="scroll|snap">              <android.support.v7.widget.toolbar                 android:layout_gravity="center_vertical"                 app:theme="@style/actionbartheme"                 app:popuptheme="@style/themeoverlay.appcompat.light"                 android:id="@+id/main_toolbar"                 android:layout_width="match_parent"                 app:layout_scrollflags="scroll|enteralways"                 android:layout_height="?attr/actionbarsize">                 <textview                     android:textsize="@dimen/action_bar_title_size"                     android:maxlines="1"                     android:ellipsize="end"                     android:text="@string/app_name"                     android:textcolor="@color/coloraccent"                     android:layout_width="wrap_content"                     android:layout_height="wrap_content" />             </android.support.v7.widget.toolbar>          </android.support.design.widget.collapsingtoolbarlayout>          <android.support.design.widget.tablayout             app:tabbackground="@color/colorprimarylight"             app:tabindicatorheight="@dimen/tab_indicator_height"             app:tabtextcolor="@color/coloraccent"             android:id="@+id/main_tab_layout"             app:tabmaxwidth="0dp"             app:tabgravity="fill"             app:tabmode="fixed"             android:layout_width="match_parent"             android:layout_height="@dimen/main_tab_bar_height">          </android.support.design.widget.tablayout>       </android.support.design.widget.appbarlayout>        <android.support.v4.view.viewpager         app:layout_behavior="@string/appbar_scrolling_view_behavior"         android:id="@+id/main_view_pager"         android:layout_width="match_parent"         android:layout_height="match_parent">      </android.support.v4.view.viewpager>       <android.support.design.widget.floatingactionbutton         app:layout_anchor="@+id/main_bottombar"         app:layout_anchorgravity="bottom|right|end"         android:layout_alignparentright="true"         android:layout_alignparentbottom="true"         android:layout_gravity="bottom|right"         android:id="@+id/fb_create_post"         android:layout_width="wrap_content"         android:layout_height="wrap_content" />   <com.roughike.bottombar.bottombar         android:background="@color/colorprimary"         app:bb_inactivetabcolor="@android:color/white"         app:bb_activetabcolor="@color/coloraccent"         android:layout_gravity="bottom"         app:bb_behavior="shy"         android:id="@+id/main_bottombar"         android:layout_width="match_parent"         android:layout_height="60dp"         android:layout_alignparentbottom="true"         app:bb_tabxmlresource="@xml/bottombar_tabs" /> </android.support.design.widget.coordinatorlayout> 

this got

enter image description here

as can see in screenshot, floating button not go when bottom bar appear bottom. fixed , hidden behind bottom bar. please how can anchor floating action button bottom bar animated when bottom bar came , animated down when bottombar goes down please? please me.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -