v1.11: pace markers + peak-hours burst icon
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>
This commit is contained in:
@@ -92,6 +92,33 @@
|
||||
android:background="@drawable/widget_background"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- Peak-hours row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="14dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgPeak"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:src="@drawable/ic_claude_burst"
|
||||
android:contentDescription="Peak hours" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvPeak"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text=""
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="12sp" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -110,16 +137,24 @@
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
<ImageView
|
||||
android:id="@+id/barSession"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_height="9dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#CC785C"
|
||||
android:progressBackgroundTint="#3A3A3A" />
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Session usage bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvSessionPace"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text=""
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvReset"
|
||||
@@ -148,16 +183,24 @@
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progressBarWeekly"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
<ImageView
|
||||
android:id="@+id/barWeekly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="8dp"
|
||||
android:layout_height="9dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#7B8FCC"
|
||||
android:progressBackgroundTint="#3A3A3A" />
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Weekly usage bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWeeklyPace"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:text=""
|
||||
android:textColor="#AAAAAA"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tvWeeklyReset"
|
||||
|
||||
@@ -23,6 +23,24 @@
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/img_peak"
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:src="@drawable/ic_claude_burst"
|
||||
android:contentDescription="Peak hours" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_peak"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:text=""
|
||||
android:textColor="#CC785C"
|
||||
android:textSize="9sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/btn_refresh"
|
||||
android:layout_width="32dp"
|
||||
@@ -69,16 +87,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
<ImageView
|
||||
android:id="@+id/bar_session"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#CC785C"
|
||||
android:progressBackgroundTint="#252525" />
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Session usage bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_session_label"
|
||||
@@ -118,16 +134,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_weekly"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
<ImageView
|
||||
android:id="@+id/bar_weekly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
android:layout_height="6dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#7B8FCC"
|
||||
android:progressBackgroundTint="#252525" />
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Weekly usage bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_weekly_label"
|
||||
|
||||
@@ -23,6 +23,14 @@
|
||||
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"
|
||||
@@ -71,16 +79,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
<ImageView
|
||||
android:id="@+id/bar_session"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#CC785C"
|
||||
android:progressBackgroundTint="#252525" />
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Session usage bar" />
|
||||
|
||||
<!-- 7-DAY row -->
|
||||
<LinearLayout
|
||||
@@ -120,16 +126,14 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/progress_bar_weekly"
|
||||
style="@android:style/Widget.ProgressBar.Horizontal"
|
||||
<ImageView
|
||||
android:id="@+id/bar_weekly"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="4dp"
|
||||
android:layout_height="5dp"
|
||||
android:layout_marginTop="3dp"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
android:progressTint="#7B8FCC"
|
||||
android:progressBackgroundTint="#252525" />
|
||||
android:scaleType="fitXY"
|
||||
android:adjustViewBounds="false"
|
||||
android:contentDescription="Weekly usage bar" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_status"
|
||||
|
||||
Reference in New Issue
Block a user