0
현재 TabLayout을 사용하는 ViewPager가 있습니다. ViewPager의 페이지 수에 따라 TabLayout에 요소를 동적으로 추가하고 있습니다.ViewPager로 TabLayout에 DrawerLayout 추가
TabLayout 왼쪽에 버거 아이콘이있는 DrawerLayout을 추가하고 싶습니다. 이 햄버거 아이콘은 TabLayout을 스크롤 할 때 볼 수 있어야합니다.
아무런 성공없이 부모 RelativeLayout을 사용하여 TabLayout 옆에 DrawerLayout을 추가하려고했습니다.
<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">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<!-- Side navigation drawer UI -->
<ListView
android:id="@+id/navList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left|start"
android:background="#ffeeeeee"/>
</android.support.v4.widget.DrawerLayout>
<android.support.design.widget.TabLayout
android:id="@+id/tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/drawer_layout"
app:tabMaxWidth="0dp"
app:tabMode="fixed"
app:tabGravity="fill"/>
</RelativeLayout>
</android.support.design.widget.AppBarLayout>
...
...
...
</android.support.design.widget.CoordinatorLayout>