超薄便携USB免驱全协议NFC读写器
APP的首界面:

页面代码:
使用了ConstraintLayout作为根布局。ConstraintLayout是Android开发中非常强大的一个布局管理器,它允许你以相对位置的方式定义界面中的元素,使得布局更加灵活和易于管理。下面是对这段代码的简单解释:
:这是XML声明,指定了XML的版本为1.0,编码方式为UTF-8。
:这是ConstraintLayout的根元素,它包含了布局的宽度(android:layout_width="match_parent",意味着宽度与父容器相同)、高度(android:layout_height="match_parent",意味着高度与父容器相同)以及内边距(android:padding="3dp",意味着布局内部有3dp的内边距)。
xmlns:android="http://schemas.android.com/apk/res/android":这定义了Android的命名空间,允许你使用Android框架中定义的属性和资源。
xmlns:app="http://schemas.android.com/apk/res-auto":这定义了应用的自定义命名空间,通常用于引用自定义属性或库中的属性。
xmlns:tools="http://schemas.android.com/tools":这定义了Android Studio等工具使用的命名空间,允许你在开发过程中添加一些仅在工具中可见的属性,比如布局预览时的属性。
< ?xml version="1.0" encoding="utf-8"? >
< androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="3dp"
tools:context=".MainActivity" >
< TextView
android:id="@+id/TextViewlabelGetdev"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="设备编号全球唯一,配合在设备存或读8字节功能,可做为软件加密狗用。"
android:textSize="12sp"
app:layout_constraintTop_toBottomOf="@+id/btnPcdgetdevicenumber"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" / >
< TextView
android:id="@+id/TextViewlabelDisp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="内容"
android:textSize="12sp"
app:layout_constraintBottom_toBottomOf="@+id/editTextDisp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="@+id/editTextDisp" / >
< EditText
android:id="@+id/editTextDisp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:background="@drawable/shape4border"
android:gravity="left"
android:inputType="textCapCharacters"
android:maxLength="40"
android:paddingLeft="3dp"
android:layout_marginRight="3dp"
android:text="天下英雄出我辈 一入江湖岁月催"
android:textSize="12sp"
app:layout_constraintLeft_toRightOf="@+id/TextViewlabelDisp"
app:layout_constraintRight_toLeftOf="@+id/buttonDisp"
app:layout_constraintTop_toTopOf="@+id/buttonDisp"
app:layout_constraintBottom_toBottomOf="@+id/buttonDisp"/ >
< TextView
android:id="@+id/text1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="请根据不同卡点击下面按键进入相应的调试页面......"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/btnBeep" / >
< TextView
android:id="@+id/sample_text"
android:layout_width="fill_parent"
android:layout_height="150dp"
android:padding="3dp"
android:text="操作结果"
android:textSize="12sp"
android:background="@drawable/shape4border"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
/ >
< ScrollView
android:id="@+id/scrollViewEM4305"
android:layout_width="fill_parent"
android:layout_height="0dp"
android:scrollbars="horizontal"
android:visibility="visible"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/text1"
app:layout_constraintBottom_toTopOf="@+id/sample_text"
>
< androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
< /androidx.constraintlayout.widget.ConstraintLayout >
< /ScrollView >
< /androidx.constraintlayout.widget.ConstraintLayout >
审核编辑 黄宇
-
Android
+关注
关注
12文章
3985浏览量
133058 -
读卡器
+关注
关注
2文章
462浏览量
41152
发布评论请先 登录
基于STEVAL-25R3916B NFC/RFID读卡器评估套件的技术解析与应用设计
技术资讯 I 如何设计存储卡读卡器
基于STMicroelectronics X-NUCLEO-NFC10A1的NFC读卡器技术解析与应用指南
ST25R300 NFC读卡器技术解析与应用指南
DD3118 高集成度读卡器控制芯片数据手册
DD3118规格书|DD3118说明书|3.0读卡器芯片规格书
MAX14502高速USB至SD读卡器,提供旁路控制技术手册
MAXQ1743 DeepCover安全磁卡读卡器IC技术手册
用于LEGIC Advant UID/序列号的NFC读卡器,为什么无法读取这些卡的UID/序列号?
网络读卡器qt代码示例
网络读卡器qt代码示例,包含获取本地ip地址。读取IC卡卡号,读取扇区数据

Android 实现读卡器读取各种卡号的信息
评论