如何将导航抽屉中的项目图标设置为该项目的右侧?

问题描述:

我希望左侧的图标保持原样,我只想在该项目右侧添加一个图标。
请检查下面的图片,它会帮助你了解我的要求。如何将导航抽屉中的项目图标设置为该项目的右侧?

enter image description here

+0

你尝试过什么? – Noorul

+0

是先生,但将导航抽屉图标带到工具栏的右侧。我不想那样。我想将项目图标放在右侧。 –

+0

为抽屉使用自定义布局设计。 –

如果您使用的抽屉布局或导航抽屉,然后它会帮助你。

只有你需要用下面的线性布局,以取代您的导航菜单的布局和需要删除所有相关活动,从代码菜单,

<LinearLayout 
     android:layout_width="220dp" 
     android:layout_height="match_parent" 
     android:layout_gravity="start" 
     android:background="@color/white" 
     android:orientation="vertical"> 
     <LinearLayout 
      android:layout_width="match_parent" 
      android:orientation="horizontal" 
      android:layout_height="wrap_content"> 
      <ImageView 
       android:layout_width="wrap_content" 
       android:src="@drawable/places_ic_search" 
       android:layout_height="wrap_content" /> 
      <ImageView 
       android:layout_width="wrap_content" 
       android:src="@drawable/places_ic_search" 
       android:layout_height="wrap_content" /> 
      <TextView 
       android:layout_width="wrap_content" 
       android:text="Hello" 
       android:layout_height="wrap_content" /> 
     </LinearLayout> 
    </LinearLayout>