2026-11-19 00:27:15 +05:30
|
|
|
<?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:background="@drawable/widget_bg"
|
|
|
|
|
android:orientation="vertical"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:padding="13dp">
|
2026-11-19 00:27:15 +05:30
|
|
|
|
|
|
|
|
<!-- Header Row -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
2026-11-19 22:15:40 +05:30
|
|
|
<!-- 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">
|
2026-11-19 00:27:15 +05:30
|
|
|
|
2026-11-19 22:15:40 +05:30
|
|
|
<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) -->
|
2026-11-19 00:27:15 +05:30
|
|
|
<LinearLayout
|
2026-11-19 22:15:40 +05:30
|
|
|
android:id="@+id/widget_header_info"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_marginStart="9dp"
|
2026-11-19 00:59:46 +05:30
|
|
|
android:layout_marginEnd="6dp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:orientation="vertical">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_device_name"
|
2026-11-19 00:59:46 +05:30
|
|
|
android:layout_width="match_parent"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
android:text="Server"
|
|
|
|
|
android:textColor="#ffffff"
|
|
|
|
|
android:textSize="14sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_node_name"
|
2026-11-19 00:59:46 +05:30
|
|
|
android:layout_width="match_parent"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:ellipsize="end"
|
|
|
|
|
android:maxLines="1"
|
|
|
|
|
android:text="debian"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:textColor="#9ca3af"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:textSize="11sp" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
2026-11-19 22:15:40 +05:30
|
|
|
<!-- Status Chip Badge -->
|
2026-11-19 00:27:15 +05:30
|
|
|
<LinearLayout
|
2026-11-19 22:15:40 +05:30
|
|
|
android:id="@+id/widget_status_chip"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:background="@drawable/widget_chip_checking"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:orientation="horizontal"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:paddingStart="7dp"
|
|
|
|
|
android:paddingTop="3dp"
|
|
|
|
|
android:paddingEnd="7dp"
|
|
|
|
|
android:paddingBottom="3dp">
|
2026-11-19 00:27:15 +05:30
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/widget_status_dot"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_width="6dp"
|
|
|
|
|
android:layout_height="6dp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:src="@drawable/widget_dot_gray"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:contentDescription="Status Dot" />
|
2026-11-19 00:27:15 +05:30
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_status_text"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_marginStart="4dp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:text="CHECKING"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:textColor="#9ca3af"
|
|
|
|
|
android:textSize="10sp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:textStyle="bold" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
2026-11-19 22:15:40 +05:30
|
|
|
<!-- Refresh Button Container (Large 32x32dp touch target) -->
|
|
|
|
|
<FrameLayout
|
2026-11-19 00:27:15 +05:30
|
|
|
android:id="@+id/widget_btn_refresh"
|
2026-11-19 22:15:40 +05:30
|
|
|
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>
|
2026-11-19 00:27:15 +05:30
|
|
|
</LinearLayout>
|
|
|
|
|
|
2026-11-19 22:15:40 +05:30
|
|
|
<!-- Sleek Horizontal Divider -->
|
2026-11-19 21:52:09 +05:30
|
|
|
<FrameLayout
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="1dp"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_marginTop="9dp"
|
|
|
|
|
android:layout_marginBottom="9dp"
|
|
|
|
|
android:background="#222228" />
|
2026-11-19 00:27:15 +05:30
|
|
|
|
|
|
|
|
<!-- Action Buttons Row -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_height="40dp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_btn_power_on"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_marginEnd="3dp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="@drawable/widget_btn_green"
|
|
|
|
|
android:gravity="center"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:text="⚡ POWER ON"
|
|
|
|
|
android:textColor="#4ade80"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:textSize="11sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_btn_reboot"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginStart="2dp"
|
|
|
|
|
android:layout_marginEnd="2dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="@drawable/widget_btn_amber"
|
|
|
|
|
android:gravity="center"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:text="🔄 REBOOT"
|
|
|
|
|
android:textColor="#fbbf24"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:textSize="11sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_btn_power_off"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_marginStart="3dp"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="@drawable/widget_btn_red"
|
|
|
|
|
android:gravity="center"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:text="🛑 OFF"
|
|
|
|
|
android:textColor="#f87171"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:textSize="11sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- Subtitle / Last Update message -->
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_footer_text"
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:layout_marginTop="7dp"
|
|
|
|
|
android:ellipsize="end"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:gravity="center"
|
2026-11-19 22:15:40 +05:30
|
|
|
android:maxLines="1"
|
|
|
|
|
android:text="Checking server status..."
|
|
|
|
|
android:textColor="#71717a"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:textSize="10sp" />
|
|
|
|
|
</LinearLayout>
|