A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.
Swift ai-agentsanthropicantigravityclaudeclaude-codecodexcursordynamic-islandgemini-cliiosiphonlinuxmacosmacos-appmenubar-appnotchopen-sourceswiftswiftuiwindows
Android Widgets: previews for the restyled Widgets
Claudeb8a06fac9061
diff --git a/android/app/src/main/res/drawable/widget_preview_image_big.xml b/android/app/src/main/res/drawable/widget_preview_image_big.xmlindex e2acd65b..68990515 100644--- a/android/app/src/main/res/drawable/widget_preview_image_big.xml+++ b/android/app/src/main/res/drawable/widget_preview_image_big.xml@@ -7,12 +7,12 @@android:top="1dp"android:right="1dp"android:bottom="1dp"- android:drawable="@drawable/widget_tint_working" />+ android:drawable="@drawable/widget_tint_attention" /><itemandroid:width="170dp"android:height="170dp"android:left="0dp"android:top="10dp"android:gravity="center"- android:drawable="@drawable/preview_mochi_working" />+ android:drawable="@drawable/preview_mochi_waiting" /></layer-list>diff --git a/android/app/src/main/res/drawable/widget_preview_image_glance.xml b/android/app/src/main/res/drawable/widget_preview_image_glance.xmlnew file mode 100644index 00000000..368b1f9d--- /dev/null+++ b/android/app/src/main/res/drawable/widget_preview_image_glance.xml@@ -0,0 +1,17 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- The picture the Widget picker shows on Android 11 (no previewLayout there): the card, its gradient and Mochi in the state of the sample. -->+<layer-list xmlns:android="http://schemas.android.com/apk/res/android">+ <item android:drawable="@drawable/widget_card" />+ <item+ android:left="1dp"+ android:top="1dp"+ android:right="1dp"+ android:bottom="1dp"+ android:drawable="@drawable/widget_tint_working" />+ <item+ android:width="64dp"+ android:height="64dp"+ android:left="16dp"+ android:gravity="start|center_vertical"+ android:drawable="@drawable/preview_mochi_working" />+</layer-list>diff --git a/android/app/src/main/res/layout/widget_preview_big.xml b/android/app/src/main/res/layout/widget_preview_big.xmlindex e0a1e8c6..1f569ac7 100644--- a/android/app/src/main/res/layout/widget_preview_big.xml+++ b/android/app/src/main/res/layout/widget_preview_big.xml@@ -1,7 +1,7 @@<?xml version="1.0" encoding="utf-8"?>-<!-- Preview of Mochi Big: a large working Mochi with a speech bubble.- A still picture for the Widget picker (android:previewLayout): sample text and numbers, no ids, nothing from the app, no runtime bitmap.- It uses the same card, border, gradient, type scale and state colours as the real Widget, so the picker shows what you will get. -->+<!-- Preview of Mochi Big: a waiting Mochi with a speech bubble, the status line and the six buttons, tinted orange while something waits.+ A still picture for the Widget picker (android:previewLayout): sample text, no ids, nothing from the app, no runtime bitmap.+ It uses the same card, border, gradient, type scale, buttons and state colours as the real Widget, so the picker shows what you will get. --><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"@@ -11,14 +11,14 @@android:layout_width="match_parent"android:layout_height="match_parent"android:layout_margin="1dp"- android:background="@drawable/widget_tint_working" />+ android:background="@drawable/widget_tint_attention" /><LinearLayoutandroid:layout_width="match_parent"android:layout_height="match_parent"android:gravity="center_horizontal"android:orientation="vertical"- android:padding="14dp">+ android:padding="12dp"><TextViewandroid:layout_width="wrap_content"@@ -28,10 +28,10 @@android:gravity="center"android:maxLines="2"android:paddingStart="16dp"- android:paddingTop="10dp"+ android:paddingTop="8dp"android:paddingEnd="16dp"- android:paddingBottom="10dp"- android:text="@string/widget_sample_bubble"+ android:paddingBottom="8dp"+ android:text="@string/widget_sample_bubble_waiting"android:textColor="@color/widget_bubble_text"android:textSize="@dimen/widget_text_name"android:textStyle="bold" />@@ -48,7 +48,7 @@android:layout_weight="1"android:importantForAccessibility="no"android:scaleType="fitCenter"- android:src="@drawable/preview_mochi_working" />+ android:src="@drawable/preview_mochi_waiting" /><LinearLayoutandroid:layout_width="wrap_content"@@ -61,26 +61,217 @@android:layout_height="@dimen/widget_dot"android:importantForAccessibility="no"android:src="@drawable/widget_dot"- android:tint="@color/widget_tone_working" />+ android:tint="@color/widget_tone_attention" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"+ android:layout_marginStart="8dp"android:ellipsize="end"android:maxLines="1"android:text="@string/widget_sample_claude"android:textColor="@color/widget_text"android:textSize="@dimen/widget_text_name"- android:textStyle="bold"- android:layout_marginStart="8dp" />+ android:textStyle="bold" /><TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"+ android:layout_marginStart="8dp"android:ellipsize="end"android:maxLines="1"- android:text="@string/widget_sample_working"+ android:text="@string/widget_sample_waiting"android:textColor="@color/widget_text_secondary"- android:textSize="@dimen/widget_text_state"- android:layout_marginStart="8dp" />+ android:textSize="@dimen/widget_text_state" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="wrap_content"+ android:layout_marginTop="8dp"+ android:orientation="vertical">++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="@dimen/widget_tile_height"+ android:orientation="horizontal">++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="match_parent"+ android:layout_marginStart="3dp"+ android:layout_marginEnd="3dp"+ android:layout_weight="1"+ android:background="@drawable/widget_tile_bg_attention"+ android:gravity="center"+ android:orientation="vertical">++ <ImageView+ android:layout_width="22dp"+ android:layout_height="22dp"+ android:importantForAccessibility="no"+ android:src="@drawable/ic_widget_home" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_btn_home"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="match_parent"+ android:layout_marginStart="3dp"+ android:layout_marginEnd="3dp"+ android:layout_weight="1"+ android:background="@drawable/widget_tile_bg_attention"+ android:gravity="center"+ android:orientation="vertical">++ <ImageView+ android:layout_width="22dp"+ android:layout_height="22dp"+ android:importantForAccessibility="no"+ android:src="@drawable/ic_widget_chat" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_btn_chat"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="match_parent"+ android:layout_marginStart="3dp"+ android:layout_marginEnd="3dp"+ android:layout_weight="1"+ android:background="@drawable/widget_tile_bg_attention"+ android:gravity="center"+ android:orientation="vertical">++ <ImageView+ android:layout_width="22dp"+ android:layout_height="22dp"+ android:importantForAccessibility="no"+ android:src="@drawable/ic_widget_settings" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_btn_settings"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="match_parent"+ android:layout_marginStart="3dp"+ android:layout_marginEnd="3dp"+ android:layout_weight="1"+ android:background="@drawable/widget_tile_bg_attention"+ android:gravity="center"+ android:orientation="vertical">++ <ImageView+ android:layout_width="22dp"+ android:layout_height="22dp"+ android:importantForAccessibility="no"+ android:src="@drawable/ic_widget_recent" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_btn_recent"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>+ </LinearLayout>++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="@dimen/widget_tile_height"+ android:layout_marginTop="6dp"+ android:orientation="horizontal">++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="match_parent"+ android:layout_marginStart="3dp"+ android:layout_marginEnd="3dp"+ android:layout_weight="1"+ android:background="@drawable/widget_tile_bg_attention"+ android:gravity="center"+ android:orientation="vertical">++ <ImageView+ android:layout_width="22dp"+ android:layout_height="22dp"+ android:importantForAccessibility="no"+ android:src="@drawable/ic_widget_session" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_btn_session"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="match_parent"+ android:layout_marginStart="3dp"+ android:layout_marginEnd="3dp"+ android:layout_weight="1"+ android:background="@drawable/widget_tile_bg_attention"+ android:gravity="center"+ android:orientation="vertical">++ <ImageView+ android:layout_width="22dp"+ android:layout_height="22dp"+ android:importantForAccessibility="no"+ android:src="@drawable/ic_widget_pair" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_btn_pair"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>+ </LinearLayout></LinearLayout></LinearLayout>++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_gravity="top|end"+ android:layout_margin="12dp"+ android:background="@drawable/widget_badge_bg"+ android:gravity="center"+ android:minWidth="22dp"+ android:paddingStart="6dp"+ android:paddingEnd="6dp"+ android:text="@string/widget_sample_one"+ android:textColor="#FF1C1C1E"+ android:textSize="@dimen/widget_text_secondary"+ android:textStyle="bold" /></FrameLayout>diff --git a/android/app/src/main/res/layout/widget_preview_glance.xml b/android/app/src/main/res/layout/widget_preview_glance.xmlnew file mode 100644index 00000000..35c1968d--- /dev/null+++ b/android/app/src/main/res/layout/widget_preview_glance.xml@@ -0,0 +1,159 @@+<?xml version="1.0" encoding="utf-8"?>+<!-- Preview of the summary widget: a working Mochi on the left, "2 agents are working" and three lines, each with a dot in the state's tone.+ A still picture for the Widget picker (android:previewLayout): sample text, no ids, nothing from the app, no runtime bitmap.+ It uses the same card, border, gradient, type scale, buttons and state colours as the real Widget, so the picker shows what you will get. -->+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"+ android:layout_width="match_parent"+ android:layout_height="match_parent"+ android:background="@drawable/widget_card">++ <FrameLayout+ android:layout_width="match_parent"+ android:layout_height="match_parent"+ android:layout_margin="1dp"+ android:background="@drawable/widget_tint_working" />++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="match_parent"+ android:gravity="center_vertical"+ android:orientation="horizontal"+ android:padding="12dp">++ <ImageView+ android:layout_width="64dp"+ android:layout_height="64dp"+ android:importantForAccessibility="no"+ android:scaleType="fitCenter"+ android:src="@drawable/preview_mochi_working" />++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="wrap_content"+ android:layout_marginStart="8dp"+ android:layout_weight="1"+ android:orientation="vertical">++ <TextView+ android:layout_width="match_parent"+ android:layout_height="wrap_content"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_two_agents"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_name"+ android:textStyle="bold" />++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="wrap_content"+ android:layout_marginTop="3dp"+ android:gravity="center_vertical"+ android:orientation="horizontal">++ <ImageView+ android:layout_width="8dp"+ android:layout_height="8dp"+ android:importantForAccessibility="no"+ android:src="@drawable/widget_dot"+ android:tint="@color/widget_tone_working" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginStart="6dp"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_claude"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_state"+ android:textStyle="bold" />++ <TextView+ android:layout_width="0dp"+ android:layout_height="wrap_content"+ android:layout_marginStart="6dp"+ android:layout_weight="1"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_working"+ android:textColor="@color/widget_text_secondary"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="wrap_content"+ android:layout_marginTop="3dp"+ android:gravity="center_vertical"+ android:orientation="horizontal">++ <ImageView+ android:layout_width="8dp"+ android:layout_height="8dp"+ android:importantForAccessibility="no"+ android:src="@drawable/widget_dot"+ android:tint="@color/widget_tone_working" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginStart="6dp"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_codex"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_state"+ android:textStyle="bold" />++ <TextView+ android:layout_width="0dp"+ android:layout_height="wrap_content"+ android:layout_marginStart="6dp"+ android:layout_weight="1"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_thinking"+ android:textColor="@color/widget_text_secondary"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>++ <LinearLayout+ android:layout_width="match_parent"+ android:layout_height="wrap_content"+ android:layout_marginTop="3dp"+ android:gravity="center_vertical"+ android:orientation="horizontal">++ <ImageView+ android:layout_width="8dp"+ android:layout_height="8dp"+ android:importantForAccessibility="no"+ android:src="@drawable/widget_dot"+ android:tint="@color/widget_tone_muted" />++ <TextView+ android:layout_width="wrap_content"+ android:layout_height="wrap_content"+ android:layout_marginStart="6dp"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_gemini"+ android:textColor="@color/widget_text"+ android:textSize="@dimen/widget_text_state"+ android:textStyle="bold" />++ <TextView+ android:layout_width="0dp"+ android:layout_height="wrap_content"+ android:layout_marginStart="6dp"+ android:layout_weight="1"+ android:ellipsize="end"+ android:maxLines="1"+ android:text="@string/widget_sample_idle"+ android:textColor="@color/widget_text_secondary"+ android:textSize="@dimen/widget_text_secondary" />+ </LinearLayout>+ </LinearLayout>+ </LinearLayout>+</FrameLayout>diff --git a/android/app/src/main/res/layout/widget_preview_pill.xml b/android/app/src/main/res/layout/widget_preview_pill.xmlindex 602d9244..8f398df9 100644--- a/android/app/src/main/res/layout/widget_preview_pill.xml+++ b/android/app/src/main/res/layout/widget_preview_pill.xml@@ -1,7 +1,7 @@<?xml version="1.0" encoding="utf-8"?>-<!-- Preview of Status Pill: a blue dot, Claude Code, Working.- A still picture for the Widget picker (android:previewLayout): sample text and numbers, no ids, nothing from the app, no runtime bitmap.- It uses the same card, border, gradient, type scale and state colours as the real Widget, so the picker shows what you will get. -->+<!-- Preview of Status Pill: a blue dot, Claude Code, Working, and the four round buttons (Home, Chat, Settings, Recent).+ A still picture for the Widget picker (android:previewLayout): sample text, no ids, nothing from the app, no runtime bitmap.+ It uses the same card, border, gradient, type scale, buttons and state colours as the real Widget, so the picker shows what you will get. --><FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"android:layout_width="match_parent"android:layout_height="match_parent"@@ -18,8 +18,15 @@android:layout_height="match_parent"android:gravity="center_vertical"android:orientation="horizontal"- android:paddingStart="18dp"- android:paddingEnd="18dp">+ android:paddingStart="16dp"+ android:paddingEnd="8dp">++ <LinearLayout+ android:layout_width="0dp"+ android:layout_height="wrap_content"+ android:layout_weight="1"+ android:gravity="center_vertical"+ android:orientation="horizontal"><ImageViewandroid:layout_width="@dimen/widget_dot"@@ -30,23 +37,63 @@<TextViewandroid:layout_width="wrap_content"android:layout_height="wrap_content"+ android:layout_marginStart="8dp"android:ellipsize="end"android:maxLines="1"android:text="@string/widget_sample_claude"android:textColor="@color/widget_text"android:textSize="@dimen/widget_text_name"- android:textStyle="bold"- android:layout_marginStart="10dp" />+ android:textStyle="bold" /><TextViewandroid:layout_width="0dp"- android:layout_height="wrap_content"- android:gravity="end"android:layout_weight="1"+ android:layout_height="wrap_content"+ android:layout_marginStart="8dp"android:ellipsize="end"android:maxLines="1"android:text="@string/widget_sample_working"android:textColor="@color/widget_text_secondary"- android:textSize="@dimen/widget_text_state"- android:layout_marginStart="10dp" />+ android:textSize="@dimen/widget_text_state" />+ </LinearLayout>++ <ImageView+ android:layout_width="@dimen/widget_button"+ android:layout_height="@dimen/widget_button"+ android:layout_marginStart="6dp"+ android:background="@drawable/widget_button_bg"+ android:importantForAccessibility="no"+ android:padding="@dimen/widget_button_pad"+ android:scaleType="fitCenter"+ android:src="@drawable/ic_widget_home" />++ <ImageView+ android:layout_width="@dimen/widget_button"+ android:layout_height="@dimen/widget_button"+ android:layout_marginStart="6dp"+ android:background="@drawable/widget_button_bg"+ android:importantForAccessibility="no"+ android:padding="@dimen/widget_button_pad"+ android:scaleType="fitCenter"+ android:src="@drawable/ic_widget_chat" />++ <ImageView+ android:layout_width="@dimen/widget_button"+ android:layout_height="@dimen/widget_button"+ android:layout_marginStart="6dp"+ android:background="@drawable/widget_button_bg"+ android:importantForAccessibility="no"+ android:padding="@dimen/widget_button_pad"+ android:scaleType="fitCenter"+ android:src="@drawable/ic_widget_settings" />++ <ImageView+ android:layout_width="@dimen/widget_button"+ android:layout_height="@dimen/widget_button"+ android:layout_marginStart="6dp"+ android:background="@drawable/widget_button_bg"+ android:importantForAccessibility="no"+ android:padding="@dimen/widget_button_pad"+ android:scaleType="fitCenter"+ android:src="@drawable/ic_widget_recent" /></LinearLayout></FrameLayout>diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xmlindex 780ee242..358fa545 100644--- a/android/app/src/main/res/values/strings.xml+++ b/android/app/src/main/res/values/strings.xml@@ -66,6 +66,8 @@<string name="widget_sample_two_agents">2 agents are working</string><string name="widget_sample_thinking">Thinking</string><string name="widget_sample_idle">Idle</string>+ <string name="widget_sample_waiting">Waiting</string>+ <string name="widget_sample_bubble_waiting">Claude Code is waiting for you</string><string name="status_connected">Connected</string><string name="status_connecting">Connecting…</string><string name="status_not_connected">Not connected</string>diff --git a/android/app/src/main/res/xml/coucou_widget_info.xml b/android/app/src/main/res/xml/coucou_widget_info.xmlindex c0e73f58..86a08df5 100644--- a/android/app/src/main/res/xml/coucou_widget_info.xml+++ b/android/app/src/main/res/xml/coucou_widget_info.xml@@ -1,13 +1,17 @@<?xml version="1.0" encoding="utf-8"?><appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"+ xmlns:tools="http://schemas.android.com/tools"+ tools:targetApi="31"android:minWidth="180dp"android:minHeight="110dp"android:targetCellWidth="3"android:targetCellHeight="2"- android:minResizeWidth="110dp"- android:minResizeHeight="70dp"+ android:minResizeWidth="150dp"+ android:minResizeHeight="90dp"android:resizeMode="horizontal|vertical"android:updatePeriodMillis="0"android:widgetCategory="home_screen"android:initialLayout="@layout/widget_glance"+ android:previewImage="@drawable/widget_preview_image_glance"+ android:previewLayout="@layout/widget_preview_glance"android:description="@string/widget_description" />diff --git a/android/i18n/app-strings.json b/android/i18n/app-strings.jsonindex e99ee9f7..fed7639e 100644--- a/android/i18n/app-strings.json+++ b/android/i18n/app-strings.json@@ -66,6 +66,8 @@"widget_sample_two_agents": "2 agents are working","widget_sample_thinking": "Thinking","widget_sample_idle": "Idle",+ "widget_sample_waiting": "Waiting",+ "widget_sample_bubble_waiting": "Claude Code is waiting for you","status_connected": "Connected","status_connecting": "Connecting…","status_not_connected": "Not connected",