Tablayout Position At The Bottom Of The Screen
I'm using android.support.design.widget and I need to set the position of TabLayout at the activity_main.xml in the bottom of the screen. I've seen that you can use TabHost, but I
Solution 1:
My Tablayout is inside a LinearLayout as you see below, gave "bottom" tp gravity of linearlayout, and this is how I use it in my class click here
<android.support.design.widget.AppBarLayoutandroid:layout_width="match_parent"android:layout_height="wrap_content"android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"></android.support.design.widget.AppBarLayout><android.support.v4.view.ViewPagerandroid:id="@+id/viewpager"android:layout_width="match_parent"android:layout_height="460dp"app:layout_behavior="@string/appbar_scrolling_view_behavior" /><LinearLayoutandroid:layout_width="match_parent"android:layout_height="80dp"android:layout_gravity="bottom"android:gravity="center"><android.support.design.widget.TabLayoutandroid:id="@+id/tablayout_home"android:layout_width="match_parent"android:layout_height="80dp"app:tabGravity="fill"app:tabMode="fixed" /></LinearLayout></android.support.design.widget.CoordinatorLayout>
Post a Comment for "Tablayout Position At The Bottom Of The Screen"