51 lines
1.6 KiB
XML
51 lines
1.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:padding="16dp"
|
|
android:gravity="top">
|
|
|
|
<TextView
|
|
android:id="@+id/tv_nfc_status"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:textSize="16sp"
|
|
android:text="状态:未启动"/>
|
|
|
|
<!-- 输入要写入的内容 -->
|
|
<EditText
|
|
android:id="@+id/et_write_content"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp"
|
|
android:hint="请输入要写入NFC的文本"
|
|
android:textSize="14sp"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_read_nfc"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp"
|
|
android:text="点击后靠近卡片读取数据"/>
|
|
|
|
<Button
|
|
android:id="@+id/btn_write_nfc"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp"
|
|
android:text="将输入框内容写入NFC"/>
|
|
|
|
<TextView
|
|
android:id="@+id/tv_nfc_data"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="10dp"
|
|
android:background="#f0f0f0"
|
|
android:padding="10dp"
|
|
android:textSize="14sp"
|
|
android:text="数据显示区域"/>
|
|
|
|
</LinearLayout>
|
|
|