fix(widget): self-contained 1-tap widget control without opening app & pixel-perfect UI (v1.2.4)
Build & Release Android APK / Build & Publish Release APK (push) Canceled after 1m24s
Build & Release Android APK / Build & Publish Release APK (push) Canceled after 1m24s
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#161619" />
|
||||
<solid android:color="#101013" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#2b2b30" />
|
||||
<corners android:radius="18dp" />
|
||||
android:color="#24242a" />
|
||||
<corners android:radius="20dp" />
|
||||
</shape>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2c1e0f" />
|
||||
<solid android:color="#281909" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:width="1.2dp"
|
||||
android:color="#f59e0b" />
|
||||
<corners android:radius="10dp" />
|
||||
<corners android:radius="11dp" />
|
||||
</shape>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#14291e" />
|
||||
<solid android:color="#0e261a" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:width="1.2dp"
|
||||
android:color="#22c55e" />
|
||||
<corners android:radius="10dp" />
|
||||
<corners android:radius="11dp" />
|
||||
</shape>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2c1214" />
|
||||
<solid android:color="#2a1013" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:width="1.2dp"
|
||||
android:color="#ef4444" />
|
||||
<corners android:radius="10dp" />
|
||||
<corners android:radius="11dp" />
|
||||
</shape>
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#18181e" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#2c2c36" />
|
||||
<corners android:radius="9dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#1a1a20" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#363640" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#2b1114" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#ef4444" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#122a1c" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#22c55e" />
|
||||
<corners android:radius="12dp" />
|
||||
</shape>
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#18181e" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
android:color="#282832" />
|
||||
<corners android:radius="8dp" />
|
||||
</shape>
|
||||
@@ -5,7 +5,7 @@
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/widget_bg"
|
||||
android:orientation="vertical"
|
||||
android:padding="12dp">
|
||||
android:padding="13dp">
|
||||
|
||||
<!-- Header Row -->
|
||||
<LinearLayout
|
||||
@@ -14,17 +14,27 @@
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:src="@drawable/widget_ic_terminal"
|
||||
android:contentDescription="Server" />
|
||||
<!-- App Launcher Icon Badge (Explicit App Launch only if user taps this badge) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/widget_app_icon_badge"
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:background="@drawable/widget_icon_badge">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/widget_ic_terminal"
|
||||
android:contentDescription="Server App" />
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Device & Node Info (Tapping this refreshes status, does NOT open app) -->
|
||||
<LinearLayout
|
||||
android:id="@+id/widget_header_clickable"
|
||||
android:id="@+id/widget_header_info"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginStart="9dp"
|
||||
android:layout_marginEnd="6dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical">
|
||||
@@ -47,58 +57,70 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:text="debian"
|
||||
android:textColor="#71717a"
|
||||
android:textColor="#9ca3af"
|
||||
android:textSize="11sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Status Dot + Text -->
|
||||
<!-- Status Chip Badge -->
|
||||
<LinearLayout
|
||||
android:id="@+id/widget_status_chip"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/widget_chip_checking"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingEnd="6dp">
|
||||
android:paddingStart="7dp"
|
||||
android:paddingTop="3dp"
|
||||
android:paddingEnd="7dp"
|
||||
android:paddingBottom="3dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/widget_status_dot"
|
||||
android:layout_width="8dp"
|
||||
android:layout_height="8dp"
|
||||
android:layout_width="6dp"
|
||||
android:layout_height="6dp"
|
||||
android:src="@drawable/widget_dot_gray"
|
||||
android:contentDescription="Status" />
|
||||
android:contentDescription="Status Dot" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/widget_status_text"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginStart="4dp"
|
||||
android:text="CHECKING"
|
||||
android:textColor="#71717a"
|
||||
android:textSize="11sp"
|
||||
android:textColor="#9ca3af"
|
||||
android:textSize="10sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Refresh Button -->
|
||||
<ImageView
|
||||
<!-- Refresh Button Container (Large 32x32dp touch target) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/widget_btn_refresh"
|
||||
android:layout_width="26dp"
|
||||
android:layout_height="26dp"
|
||||
android:contentDescription="Refresh"
|
||||
android:padding="3dp"
|
||||
android:src="@drawable/widget_ic_refresh" />
|
||||
android:layout_width="32dp"
|
||||
android:layout_height="32dp"
|
||||
android:layout_marginStart="6dp"
|
||||
android:background="@drawable/widget_btn_refresh_bg">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="16dp"
|
||||
android:layout_height="16dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/widget_ic_refresh"
|
||||
android:contentDescription="Refresh" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Spacer / Divider (FrameLayout is explicitly whitelisted in RemoteViews) -->
|
||||
<!-- Sleek Horizontal Divider -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:background="#27272a" />
|
||||
android:layout_marginTop="9dp"
|
||||
android:layout_marginBottom="9dp"
|
||||
android:background="#222228" />
|
||||
|
||||
<!-- Action Buttons Row -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="38dp"
|
||||
android:layout_height="40dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
@@ -106,12 +128,12 @@
|
||||
android:id="@+id/widget_btn_power_on"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginEnd="4dp"
|
||||
android:layout_marginEnd="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/widget_btn_green"
|
||||
android:gravity="center"
|
||||
android:text="POWER ON"
|
||||
android:textColor="#22c55e"
|
||||
android:text="⚡ POWER ON"
|
||||
android:textColor="#4ade80"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -124,8 +146,8 @@
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/widget_btn_amber"
|
||||
android:gravity="center"
|
||||
android:text="REBOOT"
|
||||
android:textColor="#f59e0b"
|
||||
android:text="🔄 REBOOT"
|
||||
android:textColor="#fbbf24"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
@@ -133,12 +155,12 @@
|
||||
android:id="@+id/widget_btn_power_off"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginStart="4dp"
|
||||
android:layout_marginStart="3dp"
|
||||
android:layout_weight="1"
|
||||
android:background="@drawable/widget_btn_red"
|
||||
android:gravity="center"
|
||||
android:text="OFF"
|
||||
android:textColor="#ef4444"
|
||||
android:text="🛑 OFF"
|
||||
android:textColor="#f87171"
|
||||
android:textSize="11sp"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
@@ -148,9 +170,11 @@
|
||||
android:id="@+id/widget_footer_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="6dp"
|
||||
android:layout_marginTop="7dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center"
|
||||
android:text="Tap header to open app • Tap action to trigger"
|
||||
android:textColor="#52525b"
|
||||
android:maxLines="1"
|
||||
android:text="Checking server status..."
|
||||
android:textColor="#71717a"
|
||||
android:textSize="10sp" />
|
||||
</LinearLayout>
|
||||
|
||||
@@ -3,4 +3,16 @@
|
||||
<item name="android:statusBarColor">#121212</item>
|
||||
<item name="android:navigationBarColor">#121212</item>
|
||||
</style>
|
||||
|
||||
<!-- Translucent invisible theme for widget biometric authentication dialog -->
|
||||
<style name="Theme.WidgetAuth" parent="android:Theme.Material.NoActionBar">
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowContentOverlay">@null</item>
|
||||
<item name="android:windowNoTitle">true</item>
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:backgroundDimEnabled">false</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowAnimationStyle">@android:style/Animation.Translucent</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user