Comment définir le remplissage des éléments à l'intérieur NavigationView.I doivent fixer paddingLeft des articles comme je l'ai enlevé icons.What j'ai essayé est, mais il ne fonctionne pas:NavigationView Rembourrage dans Android
<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"
android:fitsSystemWindows="true"
tools:openDrawer="start">
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
android:focusable="true"
android:foreground="?attr/selectableItemBackground"
app:headerLayout="@layout/nav_header_navigation_drawer"
app:itemBackground="@drawable/selected_background"
app:itemTextAppearance="@style/Drawer"
app:menu="@menu/activity_navigation_drawer_drawer" />
Mon fichier Drawer.xml dans des styles:
<style name="Drawer">
<item name="android:listPreferredItemPaddingLeft">50dp</item>
<item name="android:textSize">30sp</item>
<item name="android:typeface">serif</item>
</style>
Essayez cet espoir que ça va marcher pour vous. https://stackoverflow.com/a/39914592/7104450 –
Copie possible de [Comment surmonter ce rembourrage dans le tiroir de navigation?] (https://stackoverflow.com/questions/39913570/how-to-overcome-this- item-padding-in-navigation-tiroir) –
@SumitShukla vous voulez un remplissage entre l'icône et la textview dans le naviagtionView ..? –