1
내가 DrawerLayout에 메뉴 항목에 대한 사용자 정의 레이아웃을 연결하기 위해 노력하고있어에 대한 사용자 정의 레이아웃의 전체 폭을 설정하지만, 당신이 보는대로 메뉴 항목은 전체 폭이 없어 내가이 문제안드로이드는 메뉴
내 메뉴 레이아웃
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<group android:id="@+id/groupOne">
<item
android:id="@+id/inbox"
app:actionLayout="@layout/create_new"/>
</group>
</menu>
및 create_new
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical"
android:paddingTop="5dp"
android:paddingBottom="5dp">
<TextView
android:layout_width="match_parent"
android:layout_height="25dp"
android:text="New Text"
android:gravity="left|center"
android:layout_marginLeft="20dp"
android:background="#000"
android:textColor="#fff"/>
</LinearLayout>
,691로 그 내 사용자 지정 레이아웃
행운이 있나요? –