WiFi管理

This commit is contained in:
2026-05-11 09:43:31 +08:00
parent 2c94ba767d
commit c91b646857
13 changed files with 501 additions and 35 deletions

View 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:drawable="@drawable/check_ellipse"/>
<item android:drawable="@drawable/ellipse"/>
</selector>

View File

@@ -0,0 +1,96 @@
<?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"
tools:context=".liveVideo.AddLinkedUserActivity">
<!-- 标题栏 -->
<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/linked_user"
android:textColor="@color/black"
android:textSize="16dp"
android:textStyle="bold" />
</LinearLayout>
<!-- 搜索区域 -->
<LinearLayout
android:id="@+id/searchLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/white"
android:paddingHorizontal="16dp"
android:paddingVertical="12dp"
android:layout_marginTop="8dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/bg_user_manage"
android:gravity="center_vertical"
android:paddingHorizontal="16dp">
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:src="@drawable/search"
android:layout_marginRight="8dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/search_preset_text"
android:textColor="@color/gray"
android:textSize="14sp"/>
</LinearLayout>
</LinearLayout>
<!-- 列表区域 -->
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/rvAddLinkedUser"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:paddingHorizontal="16dp"
android:paddingTop="8dp"
android:paddingBottom="16dp"/>
<!-- 底部按钮 -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingHorizontal="16dp"
android:paddingBottom="60dp">
<android.widget.Button
android:id="@+id/btnAddLinkedUser"
android:layout_width="match_parent"
android:layout_height="40dp"
android:text="@string/confirm"
android:textColor="@color/white"
android:textSize="14dp"
android:background="@drawable/rounded_blue_bg" />
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,23 @@
<?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="56dp"
android:background="@color/white"
android:gravity="center_vertical"
android:paddingHorizontal="16dp">
<TextView
android:id="@+id/tvUserName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:textColor="@color/black"
android:textSize="16sp" />
<CheckBox
android:id="@+id/cbSelect"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/check_box_selector" />
</LinearLayout>

View File

@@ -1,36 +1,141 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout 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/white"
tools:context=".liveVideo.WiFiManagementActivity">
<!-- 标题栏 -->
<LinearLayout
android:id="@+id/topBar"
android:layout_width="match_parent"
android:layout_height="56dp"
android:gravity="center_vertical"
android:paddingHorizontal="16dp">
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/ivBack"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/back" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/topBar"
android:layout_width="match_parent"
android:layout_height="56dp">
<TextView
android:layout_width="0dp"
<ImageView
android:id="@+id/ivBack"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="16dp"
android:src="@drawable/back"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/wiFi_management"
android:textColor="@color/black"
android:textSize="18sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center"
android:text="@string/wiFi_management"
android:textColor="@color/black"
android:orientation="vertical"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@drawable/textinput_white_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_wifi" />
<EditText
android:id="@+id/etWifiName"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:layout_weight="1"
android:background="@null"
android:hint="@string/enter_wifi_name"
android:textColor="@color/black"
android:textSize="16sp" />
<android.widget.Button
android:id="@+id/btnSelectWifi"
android:layout_width="wrap_content"
android:layout_height="32dp"
android:layout_marginStart="12dp"
android:background="@drawable/rounded_blue_bg"
android:text="@string/select_wifi"
android:textColor="@color/white"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="48dp"
android:layout_marginTop="12dp"
android:background="@drawable/textinput_white_bg"
android:gravity="center_vertical"
android:orientation="horizontal"
android:paddingHorizontal="16dp">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@drawable/ic_lock" />
<EditText
android:id="@+id/etWifiPassword"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
android:background="@null"
android:hint="@string/enter_wifi_password"
android:inputType="textPassword"
android:textColor="@color/black"
android:textSize="16sp" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
<View
android:id="@+id/maskView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#80000000"
android:visibility="gone" />
<LinearLayout
android:id="@+id/bottomButtonLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical"
android:layout_marginBottom="60dp"
android:padding="16dp">
<android.widget.Button
android:id="@+id/btnConfirm"
android:layout_width="match_parent"
android:layout_height="40dp"
android:background="@drawable/rounded_blue_bg"
android:text="@string/confirm"
android:textColor="@color/white"
android:textSize="16dp"
android:textStyle="bold" />
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View File

@@ -206,7 +206,8 @@
<string name="device_model">设备型号</string>
<string name="auto_arms_start_time">自动布防开始时间</string>
<string name="auto_arms_end_time">自动布防结束时间</string>
<string name="please_select_at_least_one_user">请至少选择一个用户</string>
<string name="selected_users_voice">已选择 %d 个用户,语音</string>
<!-- Personal Profile -->
<string name="personal_info">个人信息</string>
@@ -231,8 +232,8 @@
<string name="enter_wifi_password">请输入WiFi密码</string>
<string name="connect">连接</string>
<string name="connecting">连接中...</string>
<string name="connection_failed">连接失败</string>
<string name="connection_success">连接成功</string>
<string name="wifi_connection_failed">WiFi连接失败</string>
<string name="wifi_connection_success">WiFi连接成功</string>
<!-- Dialog -->
<string name="tip">提示</string>

View File

@@ -181,6 +181,8 @@
<string name="device_model">Device model</string>
<string name="auto_arms_start_time">Auto arm start time</string>
<string name="auto_arms_end_time">Auto arm End time</string>
<string name="please_select_at_least_one_user">Please select at least one user</string>
<string name="selected_users_voice">%d user(s) selected, voice</string>
<!-- Personal Profile -->
@@ -203,8 +205,8 @@
<string name="enter_wifi_password">Enter WiFi password</string>
<string name="connect">Connect</string>
<string name="connecting">Connecting...</string>
<string name="connection_failed">Connection failed</string>
<string name="connection_success">Connected successfully</string>
<string name="wifi_connection_failed">WiFi Connection failed</string>
<string name="wifi_connection_success">WiFi Connected successfully</string>
<!-- Dialog -->
<string name="tip">Tip</string>