183 lines
6.8 KiB
XML
183 lines
6.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- 小组件预览布局 — 小米小部件中心选择器展示用 -->
|
|
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@android:id/background"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="@drawable/widget_bg">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:padding="12dp"
|
|
android:gravity="center_vertical">
|
|
|
|
<!-- 标题行 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="2dp">
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="24dp"
|
|
android:src="@drawable/rainytoken_wordmark"
|
|
android:adjustViewBounds="true" />
|
|
|
|
<ProgressBar
|
|
style="@android:style/Widget.ProgressBar.Horizontal"
|
|
android:layout_width="0dp"
|
|
android:layout_height="1dp"
|
|
android:layout_weight="1"
|
|
android:max="100"
|
|
android:progress="0"
|
|
android:progressTint="#00000000"
|
|
android:progressBackgroundTint="#00000000"
|
|
android:indeterminate="false" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/widget_auto_refresh"
|
|
android:textColor="#7A6870"
|
|
android:textSize="10sp" />
|
|
</LinearLayout>
|
|
|
|
<!-- OpenCode Go 标识 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="10dp">
|
|
|
|
<ImageView
|
|
android:layout_width="22dp"
|
|
android:layout_height="12dp"
|
|
android:src="@drawable/ic_opencode_go_logo"
|
|
android:layout_marginEnd="5dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/widget_title_opencode"
|
|
android:textColor="#7A6870"
|
|
android:textSize="11sp" />
|
|
</LinearLayout>
|
|
|
|
<!-- 5h -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="6dp">
|
|
|
|
<TextView
|
|
android:layout_width="44dp" android:layout_height="wrap_content"
|
|
android:maxLines="1" android:ellipsize="end"
|
|
android:text="5h" android:textColor="#7A6870" android:textSize="11sp" />
|
|
|
|
<TextView
|
|
android:layout_width="38dp" android:layout_height="wrap_content"
|
|
android:text="42%" android:textColor="#3A2B31" android:textSize="12sp"
|
|
android:textStyle="bold" android:gravity="end" />
|
|
|
|
<ProgressBar
|
|
style="@android:style/Widget.ProgressBar.Horizontal"
|
|
android:layout_width="0dp" android:layout_height="6dp"
|
|
android:layout_weight="1" android:layout_marginStart="8dp"
|
|
android:layout_marginEnd="8dp" android:max="100" android:progress="42"
|
|
android:progressTint="#C9436C" />
|
|
</LinearLayout>
|
|
|
|
<!-- 本周 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="6dp">
|
|
|
|
<TextView
|
|
android:layout_width="44dp" android:layout_height="wrap_content"
|
|
android:maxLines="1" android:ellipsize="end"
|
|
android:text="@string/window_weekly" android:textColor="#7A6870" android:textSize="11sp" />
|
|
|
|
<TextView
|
|
android:layout_width="38dp" android:layout_height="wrap_content"
|
|
android:text="68%" android:textColor="#3A2B31" android:textSize="12sp"
|
|
android:textStyle="bold" android:gravity="end" />
|
|
|
|
<ProgressBar
|
|
style="@android:style/Widget.ProgressBar.Horizontal"
|
|
android:layout_width="0dp" android:layout_height="6dp"
|
|
android:layout_weight="1" android:layout_marginStart="8dp"
|
|
android:layout_marginEnd="8dp" android:max="100" android:progress="68"
|
|
android:progressTint="#FFA726" />
|
|
</LinearLayout>
|
|
|
|
<!-- 本月 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<TextView
|
|
android:layout_width="44dp" android:layout_height="wrap_content"
|
|
android:maxLines="1" android:ellipsize="end"
|
|
android:text="@string/window_monthly" android:textColor="#7A6870" android:textSize="11sp" />
|
|
|
|
<TextView
|
|
android:layout_width="38dp" android:layout_height="wrap_content"
|
|
android:text="35%" android:textColor="#3A2B31" android:textSize="12sp"
|
|
android:textStyle="bold" android:gravity="end" />
|
|
|
|
<ProgressBar
|
|
style="@android:style/Widget.ProgressBar.Horizontal"
|
|
android:layout_width="0dp" android:layout_height="6dp"
|
|
android:layout_weight="1" android:layout_marginStart="8dp"
|
|
android:layout_marginEnd="8dp" android:max="100" android:progress="35"
|
|
android:progressTint="#C9436C" />
|
|
</LinearLayout>
|
|
|
|
<!-- DeepSeek 余额 -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="4dp">
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="12dp"
|
|
android:src="@drawable/ic_deepseek_logo"
|
|
android:adjustViewBounds="true"
|
|
android:layout_marginEnd="5dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="@string/widget_deepseek_balance"
|
|
android:textColor="#7A6870"
|
|
android:textSize="11sp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="¥18.00"
|
|
android:textColor="#3A2B31"
|
|
android:textSize="11sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginStart="4dp" />
|
|
</LinearLayout>
|
|
|
|
</LinearLayout>
|
|
|
|
</FrameLayout> |