android Menu设定后,点击无反应也无错误提示,求解
android:layout_marginBottom="10dp"/>
<TextView android:text="Notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp" />
<EditText android:id="@+id/notes_view"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="top"
android:layout_weight="1"
android:layout_marginBottom="10dp"/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="#FF8D8D8D"
android:gravity="center_horizontal">
<Button android:text="Save"
android:onClick="onSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<Button android:text="Cancel"
android:onClick="onCancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
android:title="@string/action_settings"/>
</menu>
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.tracker"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.tracker.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.example.tracker.AddTimeActivity"></activity>
</application>
</manifest>
[解决办法]
onMenuItemSeletced 没进去么,打个断点看看.
前面加上@Override试试.