生成二维码
This commit is contained in:
BIN
app/src/main/res/drawable/add_img.png
Normal file
BIN
app/src/main/res/drawable/add_img.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
21
app/src/main/res/drawable/bg_radio_button_selector.xml
Normal file
21
app/src/main/res/drawable/bg_radio_button_selector.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/bg_gray" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/bg_gray" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
6
app/src/main/res/drawable/bg_white_rounded.xml
Normal file
6
app/src/main/res/drawable/bg_white_rounded.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="@color/white" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
BIN
app/src/main/res/drawable/logo.png
Normal file
BIN
app/src/main/res/drawable/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
5
app/src/main/res/drawable/text_color_selector.xml
Normal file
5
app/src/main/res/drawable/text_color_selector.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_checked="true" android:color="@color/black" />
|
||||
<item android:color="@color/black" />
|
||||
</selector>
|
||||
BIN
app/src/main/res/drawable/vx.png
Normal file
BIN
app/src/main/res/drawable/vx.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
72
app/src/main/res/layout/dialog_expire_time.xml
Normal file
72
app/src/main/res/layout/dialog_expire_time.xml
Normal file
@@ -0,0 +1,72 @@
|
||||
<?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="wrap_content"
|
||||
android:background="@color/white"
|
||||
android:orientation="vertical"
|
||||
android:padding="16dp">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<RelativeLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvCancel"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/cancel"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvConfirm"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:text="@string/confirm"
|
||||
android:textColor="@color/green"
|
||||
android:textSize="14sp" />
|
||||
</RelativeLayout>
|
||||
|
||||
<!-- 选项列表 -->
|
||||
<RadioGroup
|
||||
android:id="@+id/radioGroup"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb24h"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:background="@drawable/bg_radio_button_selector"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:text="@string/expire_24h"
|
||||
android:textColor="@drawable/text_color_selector"
|
||||
android:textSize="14sp"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rb7d"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@drawable/bg_radio_button_selector"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:text="@string/expire_7d"
|
||||
android:textColor="@drawable/text_color_selector"
|
||||
android:textSize="14sp"
|
||||
android:clickable="true"
|
||||
android:focusable="true" />
|
||||
|
||||
</RadioGroup>
|
||||
|
||||
</LinearLayout>
|
||||
172
app/src/main/res/layout/invitation_code_activity.xml
Normal file
172
app/src/main/res/layout/invitation_code_activity.xml
Normal file
@@ -0,0 +1,172 @@
|
||||
<?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:id="@+id/main"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:background="@color/bg_gray"
|
||||
tools:context=".personal.InvitationCodeActivity">
|
||||
|
||||
<!-- 标题栏 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/topBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:background="@color/white">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivBack"
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/back" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:gravity="center"
|
||||
android:text="@string/invite_code"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 邀请码时效选择 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/llExpireTime"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/invite_code_expire_time"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvExpireTime"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text=""
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:src="@drawable/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 二维码卡片 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/llQrCodeCard"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@drawable/bg_white_rounded"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:text="@string/qr_code_invite"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 二维码图片 -->
|
||||
<FrameLayout
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="200dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="24dp">
|
||||
|
||||
<!-- 灰色占位背景 -->
|
||||
<View
|
||||
android:id="@+id/vQrPlaceholder"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/bg_gray" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/ivQrCode"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
<!-- 中间Logo -->
|
||||
<ImageView
|
||||
android:id="@+id/ivQrLogo"
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@mipmap/loge" />
|
||||
</FrameLayout>
|
||||
<!-- 说明文字 -->
|
||||
<TextView
|
||||
android:id="@+id/tvTips"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/invite_code_tips"
|
||||
android:textColor="@color/gray"
|
||||
android:textSize="12sp"
|
||||
android:lineSpacingMultiplier="1.2" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 其他邀请方式 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/other_invite_methods"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<!-- 微信好友 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/llWechatShare"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:background="@color/white"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingHorizontal="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="43dp"
|
||||
android:layout_height="43dp"
|
||||
android:src="@drawable/vx" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="12dp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/wechat_friend"
|
||||
android:textColor="@color/black"
|
||||
android:textSize="14sp" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/right_back" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
@@ -16,6 +16,7 @@
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvDeleteAction"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/unlink"
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
android:textSize="14sp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 列表区域 -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvLinkedUser"
|
||||
@@ -79,6 +78,7 @@
|
||||
|
||||
<!-- 底部按钮 -->
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
@@ -92,6 +92,16 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="14dp"
|
||||
android:background="@drawable/rounded_blue_bg" />
|
||||
<!-- 悬浮加号按钮 -->
|
||||
<ImageView
|
||||
android:visibility="gone"
|
||||
android:layout_gravity="end"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/add_img"
|
||||
android:id="@+id/fabAdd"/>
|
||||
</LinearLayout>
|
||||
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
@@ -85,7 +85,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="40dp"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_marginBottom="20dp"
|
||||
android:layout_marginBottom="40dp"
|
||||
android:background="@drawable/rounded_blue_bg"
|
||||
android:text="@string/submit"
|
||||
android:textColor="@color/white"
|
||||
|
||||
@@ -398,4 +398,16 @@
|
||||
<string name="password_error">密码错误</string>
|
||||
<string name="operation_password_not_set">未设置操作密码</string>
|
||||
<string name="confirm_reset_password_btn">确认重置</string>
|
||||
<string name="user_status">用户状态</string>
|
||||
<string name="contact_name">联系人姓名</string>
|
||||
<string name="id_card">身份证号</string>
|
||||
<string name="mac_address">MAC地址</string>
|
||||
<string name="invite_code">邀请码</string>
|
||||
<string name="invite_code_expire_time">邀请码有效期</string>
|
||||
<string name="qr_code_invite">二维码邀请</string>
|
||||
<string name="invite_code_tips">邀请二维码24小时内有效,仅可接受一次;手动撤销或重新生成将使原邀请二维码失效</string>
|
||||
<string name="other_invite_methods">其他邀请方式</string>
|
||||
<string name="wechat_friend">微信好友</string>
|
||||
<string name="expire_24h">24小时</string>
|
||||
<string name="expire_7d">7天</string>
|
||||
</resources>
|
||||
@@ -103,8 +103,6 @@
|
||||
<string name="add_user">Add User</string>
|
||||
<string name="admin">Admin</string>
|
||||
<string name="member">Member</string>
|
||||
<string name="normal_member">Ordinary Member</string>
|
||||
<string name="zhangsan_family">Zhang San Family</string>
|
||||
<string name="phone_number">Phone Number</string>
|
||||
<string name="enter_nickname">Enter nickname</string>
|
||||
|
||||
@@ -244,10 +242,6 @@
|
||||
|
||||
<!-- Additional missing strings -->
|
||||
<string name="scan_device_qr">Please scan the QR code on the device or manual</string>
|
||||
<string name="user_status">用户状态</string>
|
||||
<string name="contact_name">联系人姓名</string>
|
||||
<string name="id_card">身份证号</string>
|
||||
<string name="mac_address">MAC地址</string>
|
||||
<string name="workshop">Workshop</string>
|
||||
<string name="parents_home">Parents Home</string>
|
||||
<string name="smart_hanging_defense">Smart Hanging Defense</string>
|
||||
@@ -408,4 +402,16 @@
|
||||
<string name="hint_new_password_zh">Please enter new password</string>
|
||||
<string name="hint_confirm_password_zh">Please re-enter new password</string>
|
||||
<string name="confirm_reset_password_btn">Confirm Reset</string>
|
||||
<string name="user_status">User Status</string>
|
||||
<string name="contact_name">Contact Name</string>
|
||||
<string name="id_card">ID Card Number</string>
|
||||
<string name="mac_address">MAC Address</string>
|
||||
<string name="invite_code">Invite Code</string>
|
||||
<string name="invite_code_expire_time">Invite Code Expiry</string>
|
||||
<string name="qr_code_invite">QR Code Scan Invite</string>
|
||||
<string name="invite_code_tips">Invite QR code is valid for 24 hours; can only be accepted once; manual revocation or regenerating will invalidate the previous invite QR code</string>
|
||||
<string name="other_invite_methods">Other Invite Methods</string>
|
||||
<string name="wechat_friend">WeChat Friend</string>
|
||||
<string name="expire_24h">24h</string>
|
||||
<string name="expire_7d">7d</string>
|
||||
</resources>
|
||||
@@ -19,4 +19,11 @@
|
||||
<item name="android:windowEnterAnimation">@anim/slide_up</item>
|
||||
<item name="android:windowExitAnimation">@anim/slide_down</item>
|
||||
</style>
|
||||
|
||||
<style name="BottomSheetDialog" parent="Theme.Material3.DayNight.BottomSheetDialog">
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:statusBarColor">@android:color/transparent</item>
|
||||
<item name="android:navigationBarColor">@color/white</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user