java - set margin between Drawer icon and title -


i'm creating persian app , drawerlayout there space between drawer icons , titles how can decrease ?

enter image description here i've tried use custom style didn't worked

by way used code make app rtl

@targetapi(build.version_codes.jelly_bean_mr1) private void forcertlifsupported(){   if(build.version.sdk_int >= build.version_codes.jelly_bean_mr1){      getwindow().getdecorview.setlayoutdirection(view.layout_direction_rtl); }} 

layout code :

<?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" 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">  <include layout="@layout/appbar_main" android:layout_width="match_parent" android:layout_height="match_parent" />  <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:theme="@style/navigationtheme" app:headerlayout="@layout/main_nav_header"       app:menu="@menu/main_activity_drawer"/>  </android.support.v4.widget.drawerlayout> 

you can change style of navigation view in way this.

in margin bottom, change values.

<style name="navigationtheme" parent="apptheme">     <item name="android:textsize">16sp</item>     <item name="android:layout_marginbottom">2dp</item> </style> 

layout code :

<?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" 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">  <include     layout="@layout/appbar_main"     android:layout_width="match_parent"     android:layout_height="match_parent" />  <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:theme="@style/navigationtheme"     app:headerlayout="@layout/main_nav_header"     app:menu="@menu/main_activity_drawer"/>  </android.support.v4.widget.drawerlayout> 

Comments

Popular posts from this blog

java - Jasper subreport showing only one entry from the JSON data source when embedded in the Title band -

mapreduce - Resource manager does not transit to active state from standby -

serialization - Convert Any type in scala to Array[Byte] and back -