0

Büyük bir cihaz üzerinde iyi çalışan bir çekmeceye sahibim, ancak daha küçük bir cihazda tüm ekranı kaplıyor, bir ağırlık kullanmayı denedim, ancak başarılı olamadım, belki yanlış mı uyguluyorum? Aşağıdaki kod. yardım takdir, teşekkürler. Ağırlık olmadanÇekmece Boyutunu Belirtin - Xamarin Android

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:id="@+id/drawer_layout" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:fitsSystemWindows="true"> 

<android.support.design.widget.NavigationView 
android:id="@+id/nav_view" 
android:layout_height="match_parent" 
android:layout_width="325dp" 
android:layout_gravity="start" 
android:fitsSystemWindows="true" 
app:menu="@menu/drawer_view" /> 
</android.support.v4.widget.DrawerLayout> 

ağırlığı ile ama yine bu NavgiationView düzen kodunun tam uygulamasıdır

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v4.widget.DrawerLayout 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:id="@+id/drawer_layout" 
android:orientation="vertical" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
android:weightSum="2" 
android:fitsSystemWindows="true"> 

<android.support.design.widget.NavigationView 
android:id="@+id/nav_view" 
android:layout_height="match_parent" 
android:layout_width="0dp" 
android:layout_weight="1" 
android:layout_gravity="start" 
android:fitsSystemWindows="true" 
app:menu="@menu/drawer_view" /> 
</android.support.v4.widget.DrawerLayout> 

cevap

0

çalışmıyor.

<?xml version="1.0" encoding="utf-8"?> 
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res-auto" 
android:id="@+id/drawer_layout1" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true"> 
<LinearLayout 
    android:orientation="vertical" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"> 
    <include 
     android:id="@+id/cin7toolbar" 
     layout="@layout/toolbar" /> 
    <FrameLayout 
     android:id="@+id/flContentSecure" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" /> 
</LinearLayout> 
<android.support.design.widget.NavigationView 
    android:id="@+id/navigation1" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:layout_gravity="start" 
    app:headerLayout="@layout/nav_header" 
    app:menu="@menu/nav_menu_secure" /> 
</android.support.v4.widget.DrawerLayout> 

Umut sizin için işe yarıyor.