330 lines
12 KiB
XML
330 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
|
xmlns:tools="http://schemas.android.com/tools"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:padding="24dp"
|
|
android:background="#F8F7F6"
|
|
tools:context=".ui.MainActivity">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical">
|
|
|
|
<!-- Header -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="ClawdNode"
|
|
android:textSize="28sp"
|
|
android:textStyle="bold"
|
|
android:textColor="#B45309"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="AI-powered phone assistant"
|
|
android:textSize="14sp"
|
|
android:textColor="#78716C"
|
|
android:layout_marginBottom="32dp" />
|
|
|
|
<!-- Connection Status -->
|
|
<TextView
|
|
android:id="@+id/tvConnectionStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="✗ Disconnected"
|
|
android:textSize="18sp"
|
|
android:textStyle="bold"
|
|
android:textColor="#DC2626"
|
|
android:layout_marginBottom="24dp" />
|
|
|
|
<!-- Gateway Configuration -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Gateway Configuration"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="#1C1917"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<EditText
|
|
android:id="@+id/etGatewayUrl"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Gateway URL (e.g., http://100.x.x.x:18789)"
|
|
android:inputType="textUri"
|
|
android:padding="12dp"
|
|
android:background="@drawable/input_background"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<EditText
|
|
android:id="@+id/etGatewayToken"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:hint="Gateway Token"
|
|
android:inputType="textVisiblePassword"
|
|
android:padding="12dp"
|
|
android:background="@drawable/input_background"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnSaveGateway"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="Save Configuration"
|
|
android:backgroundTint="#B45309"
|
|
android:textColor="#FFFFFF"
|
|
android:layout_marginBottom="24dp" />
|
|
|
|
<!-- Connection Controls -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:layout_marginBottom="32dp">
|
|
|
|
<Button
|
|
android:id="@+id/btnConnect"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="Connect"
|
|
android:backgroundTint="#059669"
|
|
android:textColor="#FFFFFF"
|
|
android:layout_marginEnd="8dp" />
|
|
|
|
<Button
|
|
android:id="@+id/btnDisconnect"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:text="Disconnect"
|
|
android:backgroundTint="#DC2626"
|
|
android:textColor="#FFFFFF" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Permissions Section -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Permissions"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="#1C1917"
|
|
android:layout_marginBottom="12dp" />
|
|
|
|
<!-- Notification Listener -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<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="Notification Access"
|
|
android:textSize="14sp"
|
|
android:textColor="#1C1917" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvNotificationStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="✗ Not granted"
|
|
android:textSize="12sp"
|
|
android:textColor="#78716C" />
|
|
|
|
</LinearLayout>
|
|
|
|
<Button
|
|
android:id="@+id/btnGrantNotifications"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Grant"
|
|
android:backgroundTint="#E5E2DE"
|
|
android:textColor="#1C1917" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Call Screening -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<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="Call Screening"
|
|
android:textSize="14sp"
|
|
android:textColor="#1C1917" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvCallScreeningStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="✗ Not granted"
|
|
android:textSize="12sp"
|
|
android:textColor="#78716C" />
|
|
|
|
</LinearLayout>
|
|
|
|
<Button
|
|
android:id="@+id/btnGrantCallScreening"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Grant"
|
|
android:backgroundTint="#E5E2DE"
|
|
android:textColor="#1C1917" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Runtime Permissions -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="8dp">
|
|
|
|
<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="Phone & Audio Permissions"
|
|
android:textSize="14sp"
|
|
android:textColor="#1C1917" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvPermissionsStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="✗ Some missing"
|
|
android:textSize="12sp"
|
|
android:textColor="#78716C" />
|
|
|
|
</LinearLayout>
|
|
|
|
<Button
|
|
android:id="@+id/btnGrantPermissions"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Grant"
|
|
android:backgroundTint="#E5E2DE"
|
|
android:textColor="#1C1917" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Screenshot Permission -->
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center_vertical"
|
|
android:layout_marginBottom="24dp">
|
|
|
|
<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="Screen Capture"
|
|
android:textSize="14sp"
|
|
android:textColor="#1C1917" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvScreenshotStatus"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="✗ Not granted"
|
|
android:textSize="12sp"
|
|
android:textColor="#78716C" />
|
|
|
|
</LinearLayout>
|
|
|
|
<Button
|
|
android:id="@+id/btnGrantScreenshot"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Grant"
|
|
android:backgroundTint="#E5E2DE"
|
|
android:textColor="#1C1917" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Live Log -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="Connection Log"
|
|
android:textSize="16sp"
|
|
android:textStyle="bold"
|
|
android:textColor="#1C1917"
|
|
android:layout_marginBottom="8dp" />
|
|
|
|
<TextView
|
|
android:id="@+id/tvLiveLog"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="400dp"
|
|
android:background="#1C1917"
|
|
android:textColor="#22C55E"
|
|
android:fontFamily="monospace"
|
|
android:textSize="10sp"
|
|
android:padding="12dp"
|
|
android:scrollbars="vertical"
|
|
android:gravity="bottom"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<!-- Audit Log -->
|
|
<Button
|
|
android:id="@+id/btnViewAuditLog"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:text="View Audit Log"
|
|
android:backgroundTint="#E5E2DE"
|
|
android:textColor="#1C1917"
|
|
android:layout_marginBottom="16dp" />
|
|
|
|
<!-- Version -->
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:text="v0.1.0 • Security-first design"
|
|
android:textSize="12sp"
|
|
android:textColor="#A8A29E"
|
|
android:layout_gravity="center_horizontal" />
|
|
|
|
</LinearLayout>
|
|
|
|
</ScrollView>
|