838b10f2fd
Add a pace tick to each usage bar showing where you should be to finish at 100% by reset, color-coded by projected tier, plus a Claude burst icon that lights up during Anthropic peak hours (5-11 AM PT, Mon-Fri). Bars now rendered as bitmaps so the same renderer drives both the widget and the app. New: PaceCalc, PeakHours, BarRenderer, ic_claude_burst drawable. versionCode 12 / versionName 1.11. Includes rebuilt signed release APK. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
150 lines
4.8 KiB
XML
150 lines
4.8 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/widget_root"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
android:background="@drawable/widget_background"
|
|
android:padding="12dp">
|
|
|
|
<!-- Header -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="Claude Pro"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="11sp"
|
|
android:textStyle="bold" />
|
|
|
|
<ImageView
|
|
android:id="@+id/img_peak"
|
|
android:layout_width="14dp"
|
|
android:layout_height="14dp"
|
|
android:layout_marginEnd="6dp"
|
|
android:src="@drawable/ic_claude_burst"
|
|
android:contentDescription="Peak hours" />
|
|
|
|
<ImageButton
|
|
android:id="@+id/btn_refresh"
|
|
android:layout_width="28dp"
|
|
android:layout_height="28dp"
|
|
android:src="@android:drawable/ic_menu_rotate"
|
|
android:background="@android:color/transparent"
|
|
android:contentDescription="Refresh" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- SESSION row -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginTop="7dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="SESSION"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="8sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_session_value"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="—"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="11sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_session_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="6dp"
|
|
android:text=""
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="10sp"
|
|
android:textStyle="bold" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/bar_session"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="5dp"
|
|
android:layout_marginTop="3dp"
|
|
android:scaleType="fitXY"
|
|
android:adjustViewBounds="false"
|
|
android:contentDescription="Session usage bar" />
|
|
|
|
<!-- 7-DAY row -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginTop="7dp">
|
|
|
|
<TextView
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="WEEKLY"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="8sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_weekly_value"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="—"
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="11sp"
|
|
android:textStyle="bold" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_weekly_label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="6dp"
|
|
android:text=""
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="10sp"
|
|
android:textStyle="bold" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:id="@+id/bar_weekly"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="5dp"
|
|
android:layout_marginTop="3dp"
|
|
android:scaleType="fitXY"
|
|
android:adjustViewBounds="false"
|
|
android:contentDescription="Weekly usage bar" />
|
|
|
|
<TextView
|
|
android:id="@+id/tv_status"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="4dp"
|
|
android:text=""
|
|
android:textColor="#FFFFFF"
|
|
android:textSize="8sp"
|
|
android:textStyle="bold"
|
|
android:maxLines="1" />
|
|
|
|
</LinearLayout>
|