如何将导航抽屉中的项目图标设置为该项目的右侧?
答
如果您使用的抽屉布局或导航抽屉,然后它会帮助你。
只有你需要用下面的线性布局,以取代您的导航菜单的布局和需要删除所有相关活动,从代码菜单,
<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>
你尝试过什么? – Noorul
是先生,但将导航抽屉图标带到工具栏的右侧。我不想那样。我想将项目图标放在右侧。 –
为抽屉使用自定义布局设计。 –