Files
EverShelf/evershelf-kiosk/app/src/main/res/layout/activity_settings.xml
T
dadaloop82 a5094920bf kiosk: remove all external gateway app references + update docs
- SettingsActivity: replace GATEWAY_PACKAGE / PackageManager check with
  GatewayService status; show BLE device name + live :8765 probe;
  buttons now restart GatewayService or redirect to setup wizard
- activity_settings.xml: rename section label to 'BILANCIA SMART',
  update button text to '⚙️ Configura bilancia'
- evershelf-scale-gateway/README.md: add DEPRECATED notice (gateway is
  now integrated into kiosk v1.6.0+, this app is no longer maintained)
- evershelf-kiosk/README.md: full rewrite — reflects v1.6.0, integrated
  BLE gateway, 6-step wizard, permissions table, protocol reference
- README.md: update kiosk features (remove gateway APK install/launch,
  add integrated BLE service), update scale section, update architecture,
  add kiosk v1.6.0 entry in Recent Updates
2026-05-05 17:31:14 +00:00

264 lines
10 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:background="#0f172a"
android:fillViewport="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:padding="24dp">
<!-- Header -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginBottom="32dp">
<ImageButton
android:id="@+id/btnBack"
android:layout_width="40dp"
android:layout_height="40dp"
android:background="@drawable/card_background"
android:src="@android:drawable/ic_menu_revert"
android:scaleType="centerInside"
android:contentDescription="Back"
android:layout_marginEnd="16dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Settings"
android:textColor="#f1f5f9"
android:textSize="22sp"
android:textStyle="bold" />
</LinearLayout>
<!-- Server URL Section -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SERVER CONNECTION"
android:textColor="#7c3aed"
android:textSize="12sp"
android:textStyle="bold"
android:letterSpacing="0.1"
android:layout_marginBottom="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/card_background"
android:padding="16dp"
android:layout_marginBottom="24dp">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="EverShelf URL"
android:textColor="#cbd5e1"
android:textSize="14sp"
android:layout_marginBottom="8dp" />
<EditText
android:id="@+id/urlEdit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textUri"
android:textColor="#f1f5f9"
android:textColorHint="#475569"
android:hint="https://192.168.1.100/dispensa"
android:background="@drawable/input_background"
android:padding="14dp"
android:textSize="15sp"
android:singleLine="true"
android:layout_marginBottom="10dp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnTestConnection"
android:layout_width="match_parent"
android:layout_height="40dp"
android:text="Test Connection"
android:textSize="13sp"
android:textAllCaps="false"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:strokeColor="#334155"
android:textColor="#94a3b8" />
</LinearLayout>
<!-- Scale Section -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="BILANCIA SMART"
android:textColor="#7c3aed"
android:textSize="12sp"
android:textStyle="bold"
android:letterSpacing="0.1"
android:layout_marginBottom="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/card_background"
android:padding="16dp"
android:layout_marginBottom="24dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginBottom="12dp">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Servizio bilancia BLE"
android:textColor="#cbd5e1"
android:textSize="14sp" />
<TextView
android:id="@+id/scaleGatewayStatus"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Active"
android:textColor="#34d399"
android:textSize="13sp" />
</LinearLayout>
<TextView
android:id="@+id/scaleDeviceInfo"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="No scale connected"
android:textColor="#64748b"
android:textSize="13sp" />
<com.google.android.material.button.MaterialButton
android:id="@+id/btnConfigureGateway"
android:layout_width="match_parent"
android:layout_height="40dp"
android:text="⚙️ Configura bilancia"
android:textSize="13sp"
android:textAllCaps="false"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:strokeColor="#34d399"
android:textColor="#34d399"
android:layout_marginTop="12dp"
android:visibility="gone" />
</LinearLayout>
<!-- Screensaver Section -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="SCHERMO"
android:textColor="#7c3aed"
android:textSize="12sp"
android:textStyle="bold"
android:letterSpacing="0.1"
android:layout_marginBottom="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/card_background"
android:padding="16dp"
android:layout_marginBottom="24dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical">
<LinearLayout
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Salvaschermo"
android:textColor="#cbd5e1"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Oscura lo schermo dopo inattività (default: off)"
android:textColor="#64748b"
android:textSize="12sp"
android:layout_marginTop="2dp" />
</LinearLayout>
<com.google.android.material.switchmaterial.SwitchMaterial
android:id="@+id/switchScreensaver"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:checked="false" />
</LinearLayout>
</LinearLayout>
<!-- Danger Zone -->
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="RESET"
android:textColor="#ef4444"
android:textSize="12sp"
android:textStyle="bold"
android:letterSpacing="0.1"
android:layout_marginBottom="12dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/card_background"
android:padding="16dp"
android:layout_marginBottom="24dp">
<com.google.android.material.button.MaterialButton
android:id="@+id/btnRunWizard"
android:layout_width="match_parent"
android:layout_height="44dp"
android:text="Run Setup Wizard Again"
android:textSize="14sp"
android:textAllCaps="false"
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:strokeColor="#334155"
android:textColor="#94a3b8" />
</LinearLayout>
<!-- Spacer -->
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<!-- Buttons -->
<com.google.android.material.button.MaterialButton
android:id="@+id/btnSave"
android:layout_width="match_parent"
android:layout_height="52dp"
android:text="Save Changes"
android:textSize="16sp"
android:textAllCaps="false"
android:backgroundTint="#7c3aed"
android:layout_marginBottom="12dp" />
</LinearLayout>
</ScrollView>