1

I have to add a toolbar at the bottom of the screen as per the design. The app:layout_scrollFlags="scroll|enterAlways" was working fine if i remove the relative layout inside the coordinator.

But i am unable to set the toolbar at the bottom of the screen without this relative layout!

How can i manage to get bottom toolbar and Top toolbar hide functionality by changing the following layout?

<android.support.design.widget.CoordinatorLayout 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"> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.AppBarLayout android:id="@+id/appBarLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:layout_gravity="bottom" android:background="?attr/colorPrimary" app:layout_scrollFlags="scroll|enterAlways" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> <android.support.design.widget.TabLayout android:id="@+id/tabLayout" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@id/toolbar" android:background="@color/tab_color" /> </android.support.design.widget.AppBarLayout> <include layout="@layout/inc_bottom_toolbar_with_menu" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" /> <android.support.v4.view.ViewPager android:id="@+id/viewPager" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_above="@+id/bottomToolBar" android:layout_below="@id/appBarLayout" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> </RelativeLayout> </android.support.design.widget.CoordinatorLayout> 

PS : I had removed the image as my TL insisted to do so..

9
  • Your saying that u need toolbar at the bottom of the screen ? so post the actual image of your layout. Commented Jan 28, 2016 at 8:20
  • @Anoop M I had already posted the layout image. Commented Jan 28, 2016 at 8:27
  • I couldn't see any toolbar at the bottom.is that your customized toolbar at the bottom of the layout ...ahhhhh...it look likes a tab.you can use tab itself there. Commented Jan 28, 2016 at 8:30
  • @Anoop M Yes it is customized toolbar. Commented Jan 28, 2016 at 8:39
  • gun0912.com/42 | medium.com/@bherbst/… | stackoverflow.com/questions/30777698/… Commented Jan 28, 2016 at 9:31

1 Answer 1

1
<RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <android.support.design.widget.CoordinatorLayout> ----------------------- </android.support.design.widget.CoordinatorLayout> <!-- bottom contents here ---> </RelativeLayout> 
Sign up to request clarification or add additional context in comments.

1 Comment

Is that possible to hide the bottom toolbar as like that toolbar at the top of the screen.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.