I want to do so. I open the program appears main activit. His entire layout is a container that installs fragments. There is also a sidebar navigation drower. And tabs. Everything looks like this: Application is openness, the first fragment was established which corresponds to the first element of the side menu and the first taboo. Then I select the second fragment from the side-menu, and it is installed, and the second tab is highlighted. If I flip sideways with a swipe, then the fragments also change, and together with them the menu item and the tab are highlighted. And all this I can do. But in the sidebar there are some more items. For example, a personal account, about us, info and so on. And for them there are no tabs. And I want to click, for example, on a menu item for which there is no tab and to display the corresponding fragment on it in full screen. Ie remove tabs and show content. And then again if I open the side menu and select the element for which there are tabs, open the fragment and the tab will be highlighted. I don't know if they do it or not. I do not want to create a new activity for this. Podskate can this something as like antipattern or how to do it. That's about what I want enter image description here

My main activation is just a vertical layout with idi container and toolbar

<LinearLayout 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/container" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".DashboardActivity"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" android:elevation="4dp" /> </LinearLayout> 

I tried to insert tabs

 <LinearLayout 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/container" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" tools:context=".DashboardActivity"> <android.support.v7.widget.Toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:background="?attr/colorPrimary" android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" app:popupTheme="@style/ThemeOverlay.AppCompat.Light" android:elevation="4dp" /> <android.support.design.widget.TabLayout android:id="@+id/tabLayout" android:layout_width="match_parent" android:layout_height="wrap_content" app:tabIndicatorColor="@android:color/white" app:tabIndicatorHeight="6dp" app:tabSelectedTextColor="@android:color/white" app:tabTextColor="@android:color/white" /> 

But they are not displayed without the pager view.

  • Show your markup. Tabs can be done in several ways. Like the menu left. Without marking something difficult to say. - Yuriy SPb
  • Drover is a compile library ('com.mikepenz: materialdrawer: 4.3.4@aar') tabs - android.support.design.widget.TabLayout now I will add a question - Pavel
  • Tabs did for example github.com/devcolibri/RemindMeProject - Pavel
  • Well ... Try to call a fragment of the desired tabs with a height of 0 or `wrap_content 'to assign ... - Yurii

0