2978250086
- Analytics toggle (enable/disable) - Event count display - Export JSON button (copies to clipboard) - Export CSV button (copies to clipboard) - Clear data button with confirmation dialog - Persist analytics enabled state in DataStore
208 lines
8.2 KiB
XML
208 lines
8.2 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>
|
|
|
|
<!-- Usage Analytics Section -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Usage Analytics"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:layout_marginTop="16dp"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<com.google.android.material.switchmaterial.SwitchMaterial
|
|
android:id="@+id/switchAnalytics"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Enable Analytics"
|
|
android:checked="true"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvAnalyticsStats"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Events: 0"
|
|
android:textColor="#666666"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnExportJson"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:layout_marginEnd="4dp"
|
|
android:text="Export JSON"
|
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
|
|
|
|
<Button
|
|
android:id="@+id/btnExportCsv"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:layout_marginStart="4dp"
|
|
android:text="Export CSV"
|
|
style="@style/Widget.MaterialComponents.Button.OutlinedButton" />
|
|
</LinearLayout>
|
|
|
|
<Button
|
|
android:id="@+id/btnClearAnalytics"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Clear Analytics Data"
|
|
android:backgroundTint="#FF5722"
|
|
android:layout_marginBottom="24dp" />
|
|
|
|
<!-- 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>
|