源文件5 main.xml
<? xml version = "1.0" encoding = "utf-8" ?><LinearLayout xmlns:android = "http://schemas.android.com/apk/res/android"android:layout_width = "fill_parent"android:layout_height = "fill_parent"android:orientation = "vertical" ><TextViewandroid:layout_width = "fill_parent"android:layout_height = "wrap_content"android:text = "@string/hello" /><Buttonandroid:id = "@+id/button1"android:layout_width = "wrap_content"android:layout_height = "wrap_content"android:text = "@string/turn_on_send"android:onClick = "onClick" /><Buttonandroid:id = "@+id/button2"android:layout_width = "wrap_content"android:layout_height = "wrap_content"android:text = "@string/turn_on_receiver"android:onClick = "onClick" /><Buttonandroid:id = "@+id/button3"android:layout_width = "wrap_content"android:layout_height = "wrap_content"android:text = "@string/turn_on_send"android:onClick = "onClick" /><Buttonandroid:id = "@+id/button4"android:layout_width = "wrap_content"android:layout_height = "wrap_content"android:text = "@string/turn_on_receiver"android:onClick = "onClick" /><TextViewandroid:id = "@+id/content"android:layout_width = "fill_parent"android:layout_height = "wrap_content"/></LinearLayout>
源文件6 strings.xml
<? xml version = "1.0" encoding = "utf-8" ?><resources><string name = "hello" > Hello World, QuickTransferActivity! </string><string name = "app_name" > QuickTransfer </string><string name = "turn_on_send" > 开启发送 </string><string name = "turn_off_send" > 关闭发送 </string><string name = "turn_on_receiver" > 开启接受 </string><string name = "turn_off_receiver" > 关闭接受 </string></resources>
AndroidManifest.xml文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="edu.cdut.robin"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_LOGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.INSTALL_PACKAGES" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:name=".QuickTransferActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
结束!