首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

android Menu设定后,点击无反应也无异常提示,求解

2013-08-06 
android Menu设定后,点击无反应也无错误提示,求解android:layout_marginBottom10dp/TextView android

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>



Logcat提示两个Warning~~
08-04 18:25:53.727: W/ResourceType(1266): No package identifier when getting value for resource number 0x00000000
08-04 18:25:53.727: W/PackageManager(1266): Failure retrieving resources forcom.example.tracker: Resource ID #0x0


[解决办法]
onMenuItemSeletced 没进去么,打个断点看看.
前面加上@Override试试.

热点排行