diff options
| author | Lena <lena@omega> | 2026-08-01 00:00:00 +0000 |
|---|---|---|
| committer | Lena <lena@omega> | 2026-08-01 00:00:00 +0000 |
| commit | 852a8a00273c9128efeed0217a8e5d3fcd8bf780 (patch) | |
| tree | c72f959731fa3c7c809cf1a0222363b6c9c9b03b /app/src/main/res/layout/mirror.xml | |
| parent | f379b93d52bf0dbd3816ec3f64d165314771d2a6 (diff) | |
| download | scrcpy-android-852a8a00273c9128efeed0217a8e5d3fcd8bf780.tar.gz | |
app: harden mirroring lifecycle and state
Diffstat (limited to 'app/src/main/res/layout/mirror.xml')
| -rw-r--r-- | app/src/main/res/layout/mirror.xml | 46 |
1 files changed, 36 insertions, 10 deletions
diff --git a/app/src/main/res/layout/mirror.xml b/app/src/main/res/layout/mirror.xml index cf24e11..d2355a8 100644 --- a/app/src/main/res/layout/mirror.xml +++ b/app/src/main/res/layout/mirror.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> -<!-- Release Mirror layout: SurfaceView for the video pipeline plus a - floating top status pill with Record and a Reconnect button (visible - only when the session is in DISCONNECTED state). The debug layout - under src/debug/res/layout/mirror.xml shadows this with a TextureView - and extra stats overlay used by the e2e screen capture. --> +<!-- Video surface with optional target navigation and reconnect controls. --> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/root" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="#000000"> + tools:ignore="MergeRootFrame"> + <!-- Sized at runtime to the target's aspect ratio and centred, so the + black FrameLayout behind it shows as letterbox bars. --> <SurfaceView android:id="@+id/surface" android:layout_width="match_parent" @@ -39,16 +39,42 @@ android:ellipsize="end" android:text="@string/connecting"/> + + <Button + android:id="@+id/nav_back" + style="@style/Button.Secondary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/space_sm" + android:minWidth="0dp" + android:minHeight="@dimen/touch_min" + android:paddingHorizontal="@dimen/space_md" + android:paddingVertical="@dimen/space_xs" + android:text="@string/nav_back"/> + + <Button + android:id="@+id/nav_home" + style="@style/Button.Secondary" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginStart="@dimen/space_sm" + android:minWidth="0dp" + android:minHeight="@dimen/touch_min" + android:paddingHorizontal="@dimen/space_md" + android:paddingVertical="@dimen/space_xs" + android:text="@string/nav_home"/> + <Button - android:id="@+id/record" + android:id="@+id/nav_recents" style="@style/Button.Secondary" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/space_sm" - android:minHeight="0dp" + android:minWidth="0dp" + android:minHeight="@dimen/touch_min" android:paddingHorizontal="@dimen/space_md" android:paddingVertical="@dimen/space_xs" - android:text="@string/record"/> + android:text="@string/nav_recents"/> <Button android:id="@+id/reconnect" @@ -56,7 +82,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="@dimen/space_sm" - android:minHeight="0dp" + android:minHeight="@dimen/touch_min" android:paddingHorizontal="@dimen/space_md" android:paddingVertical="@dimen/space_xs" android:text="@string/reconnect" |