D
D
dimasik1002002018-02-11 17:44:05
Java
dimasik100200, 2018-02-11 17:44:05

How to include tabs inside the toolbar and not under it?

You need to create a tablayout. How can I make it appear above the toolbar instead of below it?
5a8056b3c80d2228007112.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Petr Petrovich, 2018-02-11
@michael_bel

<android.support.design.widget.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="wrap_content"
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light">

        <android.support.design.widget.TabLayout
            android:id="@+id/tab_layout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"/>

    </android.support.v7.widget.Toolbar>

</android.support.design.widget.AppBarLayout>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question