feat(android): Add screen context capture for voice assistant

This commit is contained in:
cogwheel0
2025-11-21 19:50:39 +05:30
parent 20e57e9f88
commit f18edc7fe0
7 changed files with 228 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#2196F3" />
<corners android:radius="20dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@android:color/white" />
<corners android:radius="28dp" />
</shape>

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/rounded_overlay_bg"
android:padding="24dp"
android:elevation="8dp"
android:layout_marginBottom="16dp">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginBottom="24dp">
<!-- App Icon Placeholder (optional) -->
<!-- <ImageView ... /> -->
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Conduit"
android:textSize="20sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:fontFamily="sans-serif-medium"/>
<!-- Close Button (X) -->
<ImageView
android:id="@+id/btn_close"
android:layout_width="24dp"
android:layout_height="24dp"
android:src="@android:drawable/ic_menu_close_clear_cancel"
android:alpha="0.5"/>
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="I can read your screen to help you."
android:textSize="16sp"
android:textColor="#5F6368"
android:layout_marginBottom="24dp"/>
<Button
android:id="@+id/btn_summarize"
android:layout_width="match_parent"
android:layout_height="56dp"
android:text="Summarize this screen"
android:textAllCaps="false"
android:textSize="16sp"
android:textStyle="bold"
android:textColor="@android:color/white"
android:background="@drawable/rounded_button_bg"
android:stateListAnimator="@null"
android:elevation="0dp"/>
</LinearLayout>
</FrameLayout>