메뉴에서 "android : actionLayout"을 사용하는 데 문제가 있습니다.ActionBar의 사용자 정의 메뉴 항목
저는 이것을 사용하고 이전 프로젝트에서 일 했었지만 지금은 무슨 일이 일어나고 있는지 전혀 모르겠습니다.
은 내가android:title="@string/menu_notifications"
android:actionLayout="@layout/menu_notification"
내 응용 프로그램이 텍스트 변경에 액션 바의 모든 아이콘
을 입력합니다.나는 많은 것을 시도해 보았습니다. 나는 무슨 일이 일어나고 있는지 전혀 모른다.
조언/아이디어를 부탁드립니다.
EDIT : menu_notification.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="wrap_content"
android:layout_height="match_parent">
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="TEST"
android:textSize="20dp"
android:textColor="#F00"
/>
</LinearLayout>
EDIT 2 등
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
예는 OS의 버전이 테스트 무엇 XML –
되어 있습니까? – user1730007
의 @MSS 당신 확인 "menu_notification"XML –