排卡最新升级
This commit is contained in:
14
app/src/main/res/layout/activity_nfc.xml
Normal file
14
app/src/main/res/layout/activity_nfc.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:text="Waiting for NFC tag..."
|
||||
android:textSize="18sp"/>
|
||||
</RelativeLayout>
|
||||
|
||||
@@ -1,125 +1,140 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/colorOnPrimary"
|
||||
android:fillViewport="true">
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" xmlns:tools="http://schemas.android.com/tools"
|
||||
android:background="@color/colorOnPrimary"
|
||||
android:fillViewport="true"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
<LinearLayout
|
||||
<androidx.appcompat.widget.Toolbar
|
||||
android:id="@+id/toolbar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/enterParty">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp">
|
||||
android:layout_height="?attr/actionBarSize"
|
||||
android:background="@color/colorPrimary"
|
||||
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
|
||||
app:titleTextColor="@color/white"
|
||||
app:subtitleTextColor="@color/white"
|
||||
android:tooltipText="@string/app_name"
|
||||
app:popupTheme="@style/ThemeOverlay.AppCompat.Light"/>
|
||||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="8dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/party"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="PartyName" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="进入或创建房间"
|
||||
android:id="@+id/enter"/>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
<!-- 水平布局包含两个卡片 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="16dp">
|
||||
|
||||
<!-- 输入框,占据剩余空间 -->
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
<!-- 第一个卡片 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
android:paddingEnd="8dp">
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
android:id="@+id/name"
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="输入您的昵称(方便别人识别)" />
|
||||
</com.google.android.material.textfield.TextInputLayout>
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="100dp"
|
||||
<ImageView
|
||||
android:id="@+id/player1Avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_launcher"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="48dp"
|
||||
android:maxHeight="48dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/player1Name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Player 1"
|
||||
android:textColor="@color/textcolorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:paddingStart="8dp"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<!-- 第二个卡片 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:text="Default"
|
||||
android:id="@+id/card"/>
|
||||
</LinearLayout>
|
||||
android:layout_margin="8dp"
|
||||
android:layout_weight="1"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<LinearLayout
|
||||
<ImageView
|
||||
android:id="@+id/player2Avatar"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:src="@drawable/ic_launcher"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="48dp"
|
||||
android:maxHeight="48dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/player2Name"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Player 2"
|
||||
android:textColor="@color/textcolorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:paddingStart="8dp"/>
|
||||
</LinearLayout>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<!-- ScrollView 包含边框 -->
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
android:id="@+id/back"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:id="@+id/joinParty">
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/partyHouse"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/textcolorPrimary"
|
||||
android:layout_height="wrap_content"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_margin="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardElevation="4dp"
|
||||
app:cardBackgroundColor="@color/colorOnPrimary">
|
||||
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="排卡"
|
||||
android:textColor="@color/white"
|
||||
android:id="@+id/add"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/red"
|
||||
android:text="退勤"
|
||||
android:id="@+id/leave"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:visibility="gone"
|
||||
android:text="上机"
|
||||
android:id="@+id/play"/>
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
<TableLayout
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<TableLayout
|
||||
android:id="@+id/tableLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:stretchColumns="*">
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
<!-- 这里可以添加排序列表的行 -->
|
||||
</TableLayout>
|
||||
</ScrollView>
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@color/colorSecondary"
|
||||
android:contentDescription="123"
|
||||
android:src="@drawable/id_add"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
tools:ignore="MissingConstraints"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
22
app/src/main/res/layout/dialog_uplay.xml
Normal file
22
app/src/main/res/layout/dialog_uplay.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="600dp"
|
||||
android:layout_height="1000dp"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/colorOnPrimary"
|
||||
android:layout_margin="0dp"
|
||||
android:padding="0dp"> <!-- 移除内边距 -->
|
||||
|
||||
<!-- 上机按钮 -->
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btnPlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="600dp"
|
||||
android:text="上机"
|
||||
android:textColor="@color/white"
|
||||
app:backgroundTint="@color/VlineBaseGreen"
|
||||
android:gravity="center"
|
||||
android:layout_margin="0dp"
|
||||
android:textSize="18sp"/>
|
||||
</LinearLayout>
|
||||
@@ -44,6 +44,10 @@
|
||||
<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="18sp"
|
||||
android:textColor="@color/colorSecondaryVariant"
|
||||
android:id="@+id/dec"/>
|
||||
<com.google.android.material.button.MaterialButton android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="下载全部本子"
|
||||
android:id="@+id/download"/>
|
||||
</LinearLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
|
||||
50
app/src/main/res/layout/paika_dialog.xml
Normal file
50
app/src/main/res/layout/paika_dialog.xml
Normal file
@@ -0,0 +1,50 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout 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="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogTitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="操作选择"
|
||||
android:textSize="20sp"
|
||||
android:textColor="@color/textcolorPrimary"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/dialogMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="请选择一个操作"
|
||||
android:textSize="16sp"
|
||||
android:textColor="@color/textcolorPrimary"
|
||||
android:layout_marginTop="8dp"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/addButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="排卡"
|
||||
android:textColor="@color/white"
|
||||
app:backgroundTint="@color/VlineBaseGreen"/>
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/leaveButton"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="退勤"
|
||||
android:textColor="@color/white"
|
||||
app:backgroundTint="@color/red"
|
||||
tools:ignore="MissingConstraints"/>
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/leaveRoomButton"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:text="退出房间"
|
||||
android:textColor="@color/white"
|
||||
app:backgroundTint="@color/colorPrimary"
|
||||
tools:ignore="MissingConstraints"/>
|
||||
</LinearLayout>
|
||||
19
app/src/main/res/layout/paika_item_dialog.xml
Normal file
19
app/src/main/res/layout/paika_item_dialog.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
|
||||
android:padding="16dp"
|
||||
|
||||
android:layout_height="match_parent" android:orientation="vertical">
|
||||
<com.google.android.material.button.MaterialButton android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/change"
|
||||
tools:ignore="MissingConstraints"/>
|
||||
<com.google.android.material.button.MaterialButton android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/removeButton"
|
||||
tools:ignore="MissingConstraints"/>
|
||||
<com.google.android.material.button.MaterialButton android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/fuzhushangji"
|
||||
tools:ignore="MissingConstraints"/>
|
||||
</LinearLayout>
|
||||
25
app/src/main/res/layout/table_row_item.xml
Normal file
25
app/src/main/res/layout/table_row_item.xml
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<TableRow xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="16dp"
|
||||
android:background="?attr/selectableItemBackground">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/userAvatar"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_launcher"
|
||||
android:adjustViewBounds="true"
|
||||
android:maxWidth="48dp"
|
||||
android:maxHeight="48dp"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/username"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Username"
|
||||
android:textColor="@color/textcolorPrimary"
|
||||
android:textSize="16sp"
|
||||
android:paddingStart="16dp"/>
|
||||
</TableRow>
|
||||
@@ -29,4 +29,7 @@
|
||||
<color name="border_color">#000000</color> <!-- 黑色 -->
|
||||
|
||||
<color name="red">#F44336</color>
|
||||
<color name="red2">#FF9189</color>
|
||||
|
||||
<color name="dividerColor">#7D7D7D</color>
|
||||
</resources>
|
||||
5
app/src/main/res/xml/nfc_filter.xml
Normal file
5
app/src/main/res/xml/nfc_filter.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<nfc>
|
||||
<tech-list>
|
||||
<tech>android.nfc.tech.Ndef</tech>
|
||||
</tech-list>
|
||||
</nfc>
|
||||
Reference in New Issue
Block a user