NFC卡片读写功能调试完成。
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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:padding="16dp"
|
||||
android:gravity="top">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_nfc_status"
|
||||
@@ -13,28 +13,38 @@
|
||||
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:text="写入测试数据"/>
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="将输入框内容写入NFC"/>
|
||||
|
||||
<!-- 新增:主动读取NFC按钮 -->
|
||||
<Button
|
||||
android:id="@+id/btn_read_nfc"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
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:layout_marginTop="10dp"
|
||||
android:text="数据"/>
|
||||
|
||||
android:textSize="14sp"
|
||||
android:text="数据显示区域"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user