Android之Intent&BroadcastReceiver
2010-05-31 14:46:00 来源:WEB开发网>
< TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
/ >
< Button
android:id = "@+id/btn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Click Me"
/ >
< /LinearLayout >
四、AndroidManifest.xml
< ?xml version="1.0" encoding="utf-8"? >
< manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ext.owen.test"
android:versionCode="1"
android:versionName="1.0" >
< application android:icon="@drawable/icon" android:label="@string/app_name" >
< activity android:name=".TestAndroid"
android:label="@string/app_name" >
< intent-filter >
< action android:name="android.intent.action.MAIN" / >
< category android:name="android.intent.category.LAUNCHER" / >
< /intent-filter >
< /activity >
< receiver android:name = "TestBroadcastReceiver" >
< intent-filter >
< action android:name = "ext.owen.test.NEW_BROADCAST"/ >
< /intent-filter >
< /receiver >
< /application >
< uses-sdk android:minSdkVersion="3" / >
< /manifest >
Tags:Android Intent BroadcastReceiver
编辑录入:coldstar [复制链接] [打 印]更多精彩
赞助商链接