feat: replace with native Android empty-shell UI (Main/Settings + stub ServerClient/WatchBridge)
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
<?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="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:background="@color/deep_blue">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="24sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/status_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/status_disconnected"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_refresh"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/btn_refresh" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_settings"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="12dp"
|
||||
android:text="@string/btn_settings" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="32dp"
|
||||
android:text="@string/shell_hint"
|
||||
android:textColor="@color/light_blue"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,69 @@
|
||||
<?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="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:background="@color/deep_blue">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/settings_title"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="20dp"
|
||||
android:text="@string/label_server"
|
||||
android:textColor="@color/light_blue" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_server"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_server"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/light_blue" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/label_user"
|
||||
android:textColor="@color/light_blue" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_user"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_user"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/light_blue" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="16dp"
|
||||
android:text="@string/label_token"
|
||||
android:textColor="@color/light_blue" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/input_token"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:hint="@string/hint_token"
|
||||
android:inputType="textPassword"
|
||||
android:textColor="@color/white"
|
||||
android:textColorHint="@color/light_blue" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/btn_save"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="24dp"
|
||||
android:text="@string/btn_save" />
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="deep_blue">#0B1220</color>
|
||||
<color name="white">#FFFFFF</color>
|
||||
<color name="light_blue">#B7C8E8</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">DSHWatch Phone</string>
|
||||
<string name="status_disconnected">未连接(空壳)</string>
|
||||
<string name="btn_refresh">刷新状态</string>
|
||||
<string name="btn_settings">设置</string>
|
||||
<string name="settings_title">设置</string>
|
||||
<string name="label_server">服务器地址</string>
|
||||
<string name="hint_server">ws://host:port</string>
|
||||
<string name="label_user">用户ID</string>
|
||||
<string name="hint_user">userId</string>
|
||||
<string name="label_token">Token</string>
|
||||
<string name="hint_token">token</string>
|
||||
<string name="btn_save">保存(空壳)</string>
|
||||
<string name="shell_hint">空壳 UI:后续接入 DSHWatch_Server + 小米穿戴 SDK(BLE 网关)。</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="Theme.DSHWatch" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<item name="colorPrimary">#33B4FF</item>
|
||||
<item name="colorPrimaryDark">#0B1220</item>
|
||||
<item name="colorAccent">#33B4FF</item>
|
||||
<item name="android:windowBackground">@color/deep_blue</item>
|
||||
</style>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user