<?xml version="1.0" encoding="utf-8"?>
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/swipe" android:layout_width="match_parent" android:layout_height="match_parent">
<ScrollView android:layout_width="match_parent" android:layout_height="match_parent"
    android:background="@color/bg">
    <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
        android:orientation="vertical" android:padding="16dp">
        <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:text="@string/dashboard" android:textSize="22sp" android:textStyle="bold"/>
        <TextView android:id="@+id/tvStatus" android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:text="Idle"
            android:textColor="@color/text_secondary" android:layout_marginBottom="12dp"/>
        <com.google.android.material.card.MaterialCardView android:layout_width="match_parent"
            android:layout_height="wrap_content" app:cardCornerRadius="14dp" app:cardElevation="2dp"
            android:layout_marginBottom="12dp">
            <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
                android:orientation="vertical" android:padding="16dp">
                <TextView android:id="@+id/tvDeviceId" android:layout_width="wrap_content"
                    android:layout_height="wrap_content" android:textStyle="bold" android:textSize="18sp"/>
                <TextView android:id="@+id/tvUid" android:layout_width="wrap_content"
                    android:layout_height="wrap_content" android:textColor="@color/text_secondary"/>
            </LinearLayout>
        </com.google.android.material.card.MaterialCardView>
        <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
            android:orientation="horizontal" android:weightSum="2">
            <com.google.android.material.card.MaterialCardView android:layout_width="0dp"
                android:layout_weight="1" android:layout_height="wrap_content" android:layout_marginEnd="6dp"
                app:cardCornerRadius="14dp" app:cardElevation="2dp">
                <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
                    android:orientation="vertical" android:padding="16dp">
                    <TextView android:id="@+id/tvPending" android:layout_width="wrap_content"
                        android:layout_height="wrap_content" android:text="0" android:textSize="26sp"
                        android:textStyle="bold" android:textColor="@color/brand"/>
                    <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                        android:text="Pending Commands" android:textColor="@color/text_secondary"/>
                </LinearLayout>
            </com.google.android.material.card.MaterialCardView>
            <com.google.android.material.card.MaterialCardView android:layout_width="0dp"
                android:layout_weight="1" android:layout_height="wrap_content" android:layout_marginStart="6dp"
                app:cardCornerRadius="14dp" app:cardElevation="2dp">
                <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content"
                    android:orientation="vertical" android:padding="16dp">
                    <TextView android:id="@+id/tvOffline" android:layout_width="wrap_content"
                        android:layout_height="wrap_content" android:text="0" android:textSize="26sp"
                        android:textStyle="bold" android:textColor="@color/brand"/>
                    <TextView android:layout_width="wrap_content" android:layout_height="wrap_content"
                        android:text="Offline Queue" android:textColor="@color/text_secondary"/>
                </LinearLayout>
            </com.google.android.material.card.MaterialCardView>
        </LinearLayout>
        <com.google.android.material.button.MaterialButton android:id="@+id/btnRefresh"
            android:layout_width="match_parent" android:layout_height="wrap_content"
            android:layout_marginTop="16dp" android:text="Refresh Now"/>
    </LinearLayout>
</ScrollView>
</androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
