4f33255417
- SignageManager.kt: Handles URL rotation with configurable interval - Admin UI: Toggle, URL list (one per line), interval setting - SignageManagerTest.kt: 9 unit tests for rotation logic Features: - Enable/disable signage mode - Configure list of URLs to rotate - Set rotation interval (min 5 seconds) - Pauses on user interaction (resumes after 1 min) - Resets to first URL on idle timeout Note: MainActivity integration pending
149 lines
5.9 KiB
XML
149 lines
5.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:padding="24dp">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Kiosk Browser Settings"
|
|
android:textSize="24sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginBottom="24dp" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Homepage URL"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/etHomepage"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textUri" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Allowed Domains (comma-separated)"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/etWhitelist"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="text" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Idle Timeout (seconds)"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/etIdleTimeout"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="number" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Admin PIN"
|
|
android:layout_marginBottom="24dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/etAdminPin"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="numberPassword" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<!-- Digital Signage Section -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Digital Signage"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switchSignage"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Enable URL Rotation"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Signage URLs (one per line)"
|
|
android:layout_marginBottom="16dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/etSignageUrls"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="textMultiLine"
|
|
android:minLines="3"
|
|
android:gravity="top" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<com.google.android.material.textfield.TextInputLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Rotation Interval (seconds)"
|
|
android:layout_marginBottom="24dp">
|
|
|
|
<com.google.android.material.textfield.TextInputEditText
|
|
android:id="@+id/etSignageInterval"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:inputType="number"
|
|
android:text="30" />
|
|
</com.google.android.material.textfield.TextInputLayout>
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal">
|
|
|
|
<Button
|
|
android:id="@+id/btnSave"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:layout_marginEnd="8dp"
|
|
android:text="Save Settings" />
|
|
|
|
<Button
|
|
android:id="@+id/btnExit"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="Back to Kiosk" />
|
|
</LinearLayout>
|
|
|
|
<Button
|
|
android:id="@+id/btnExitKiosk"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="16dp"
|
|
android:backgroundTint="#D32F2F"
|
|
android:text="Exit Kiosk Mode" />
|
|
|
|
</LinearLayout>
|
|
</ScrollView>
|