1
私はカスタムツールバーとナビゲーションビューを持っています。しかし、私はナビゲーションビューを開くと、それはフルスクリーンに見えます。私はツールバーの下にそれをしたい。どうすれば修正できますか?ここに私のactivity_main.xml
です:NavitagionViewをツールバーの下に設定するにはどうすればよいですか?
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<LinearLayout
android:id="@+id/container_app_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include --> MY CUSTOM TOOLBAR
android:id="@+id/app_bar"
layout="@layout/app_bar" />
<FrameLayout
android:id="@+id/flContent"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<it.neokree.materialtabs.MaterialTabHost
android:id="@+id/materialTabHost"
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_below="@+id/app_bar"
app:accentColor="@color/colorPrimaryLight"
app:hasIcons="true"
app:iconColor="@android:color/white"
app:materialTabsPrimaryColor="#009688" />
</LinearLayout>
<android.support.v4.view.ViewPager
android:id="@+id/viewPager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_below="@+id/materialTabHost"
android:layout_weight="1" />
</LinearLayout>
<android.support.design.widget.NavigationView
app:theme = "@style/NavigationViewStyle"
android:id="@+id/nvView"
android:layout_width="250dp"
app:itemIconTint="@color/colorPrimaryDark"
android:layout_height="match_parent"
android:layout_gravity="start"
android:background="#fff"
app:menu="@menu/drawer_view" />
私は、ツールバーの下にショーnavigationdrawerのためのいくつかの方法を試してみましたが、私は毎ターンでのエラーを得ました。助けてください?
Sağolkardeşim:)ありがとう、それは働いた。 – whatwasmynickname
ne demek;)正しい答えとして受け入れることができます。 – uguboz