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"
|
|
|
|
|
android:padding="12dp">
|
|
|
|
|
|
|
|
|
|
<!-- Header Row -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:layout_width="18dp"
|
|
|
|
|
android:layout_height="18dp"
|
2026-11-19 21:52:09 +05:30
|
|
|
android:src="@drawable/widget_ic_terminal"
|
2026-11-19 00:27:15 +05:30
|
|
|
android:contentDescription="Server" />
|
|
|
|
|
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:id="@+id/widget_header_clickable"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginStart="8dp"
|
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"
|
|
|
|
|
android:textColor="#71717a"
|
|
|
|
|
android:textSize="11sp" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- Status Dot + Text -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:gravity="center_vertical"
|
|
|
|
|
android:orientation="horizontal"
|
|
|
|
|
android:paddingEnd="6dp">
|
|
|
|
|
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/widget_status_dot"
|
|
|
|
|
android:layout_width="8dp"
|
|
|
|
|
android:layout_height="8dp"
|
|
|
|
|
android:src="@drawable/widget_dot_gray"
|
|
|
|
|
android:contentDescription="Status" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_status_text"
|
|
|
|
|
android:layout_width="wrap_content"
|
|
|
|
|
android:layout_height="wrap_content"
|
|
|
|
|
android:layout_marginStart="5dp"
|
|
|
|
|
android:text="CHECKING"
|
|
|
|
|
android:textColor="#71717a"
|
|
|
|
|
android:textSize="11sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
</LinearLayout>
|
|
|
|
|
|
|
|
|
|
<!-- Refresh Button -->
|
|
|
|
|
<ImageView
|
|
|
|
|
android:id="@+id/widget_btn_refresh"
|
|
|
|
|
android:layout_width="26dp"
|
|
|
|
|
android:layout_height="26dp"
|
|
|
|
|
android:contentDescription="Refresh"
|
|
|
|
|
android:padding="3dp"
|
2026-11-19 21:52:09 +05:30
|
|
|
android:src="@drawable/widget_ic_refresh" />
|
2026-11-19 00:27:15 +05:30
|
|
|
</LinearLayout>
|
|
|
|
|
|
2026-11-19 21:52:09 +05:30
|
|
|
<!-- Spacer / Divider (FrameLayout is explicitly whitelisted in RemoteViews) -->
|
|
|
|
|
<FrameLayout
|
2026-11-19 00:27:15 +05:30
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="1dp"
|
|
|
|
|
android:layout_marginTop="8dp"
|
|
|
|
|
android:layout_marginBottom="8dp"
|
|
|
|
|
android:background="#27272a" />
|
|
|
|
|
|
|
|
|
|
<!-- Action Buttons Row -->
|
|
|
|
|
<LinearLayout
|
|
|
|
|
android:layout_width="match_parent"
|
|
|
|
|
android:layout_height="38dp"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:orientation="horizontal">
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_btn_power_on"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginEnd="4dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="@drawable/widget_btn_green"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:text="POWER ON"
|
|
|
|
|
android:textColor="#22c55e"
|
|
|
|
|
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"
|
|
|
|
|
android:text="REBOOT"
|
|
|
|
|
android:textColor="#f59e0b"
|
|
|
|
|
android:textSize="11sp"
|
|
|
|
|
android:textStyle="bold" />
|
|
|
|
|
|
|
|
|
|
<TextView
|
|
|
|
|
android:id="@+id/widget_btn_power_off"
|
|
|
|
|
android:layout_width="0dp"
|
|
|
|
|
android:layout_height="match_parent"
|
|
|
|
|
android:layout_marginStart="4dp"
|
|
|
|
|
android:layout_weight="1"
|
|
|
|
|
android:background="@drawable/widget_btn_red"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:text="OFF"
|
|
|
|
|
android:textColor="#ef4444"
|
|
|
|
|
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"
|
|
|
|
|
android:layout_marginTop="6dp"
|
|
|
|
|
android:gravity="center"
|
|
|
|
|
android:text="Tap header to open app • Tap action to trigger"
|
|
|
|
|
android:textColor="#52525b"
|
|
|
|
|
android:textSize="10sp" />
|
|
|
|
|
</LinearLayout>
|