aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res/values
diff options
context:
space:
mode:
authorLena <lena@omega>2026-01-01 00:00:00 +0000
committerLena <lena@omega>2026-06-24 22:14:50 +0300
commiteb0c8951196c637e44daf3c0617b131b997d5d2c (patch)
tree2f83b6a41cee745467e53fc401942b82cea286ea /app/src/main/res/values
downloadscrcpy-android-0.1.tar.gz
scrcpy-android: mirror an Android device over wireless ADB0.1
Native Java app for Android 12+ that mirrors another Android device over wireless ADB, forwarding video, audio, touch input, and clipboard. Bundles a pinned scrcpy-server.jar and the vendored libadb-android stack. Supports h264/h265/av1 video and raw/opus audio with in-app codec selection. No NDK, no Kotlin. Includes JVM unit tests and a Docker-based emulator e2e rig.
Diffstat (limited to 'app/src/main/res/values')
-rw-r--r--app/src/main/res/values/colors.xml16
-rw-r--r--app/src/main/res/values/dimens.xml17
-rw-r--r--app/src/main/res/values/ids.xml10
-rw-r--r--app/src/main/res/values/strings.xml36
-rw-r--r--app/src/main/res/values/styles.xml73
-rw-r--r--app/src/main/res/values/themes.xml32
6 files changed, 184 insertions, 0 deletions
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..7e9fa9b
--- /dev/null
+++ b/app/src/main/res/values/colors.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Dark palette built around the launcher icon's CRT-blue. The light
+ foreground (#E8E8E8) matches the icon; the cyan/teal accent tints
+ interactive controls. Hex values live here only; layouts reference
+ them by name. -->
+<resources>
+ <color name="bg">#0B1620</color>
+ <color name="surface">#14242E</color>
+ <color name="surface_alt">#0E1E28</color>
+ <color name="stroke">#283D49</color>
+ <color name="accent">#3FD0D6</color>
+ <color name="on_surface">#E8E8E8</color>
+ <color name="on_surface_muted">#8AA0AB</color>
+ <color name="on_accent">#04222B</color>
+ <color name="status_scrim">#B3000000</color>
+</resources>
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
new file mode 100644
index 0000000..0ec4c88
--- /dev/null
+++ b/app/src/main/res/values/dimens.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Single spacing scale and corner radii, referenced everywhere so the
+ layout rhythm stays consistent. -->
+<resources>
+ <dimen name="space_xs">4dp</dimen>
+ <dimen name="space_sm">8dp</dimen>
+ <dimen name="space_md">12dp</dimen>
+ <dimen name="space_lg">16dp</dimen>
+ <dimen name="space_xl">24dp</dimen>
+
+ <dimen name="card_radius">14dp</dimen>
+ <dimen name="field_radius">8dp</dimen>
+ <dimen name="button_radius">10dp</dimen>
+
+ <dimen name="card_padding">16dp</dimen>
+ <dimen name="touch_min">48dp</dimen>
+</resources>
diff --git a/app/src/main/res/values/ids.xml b/app/src/main/res/values/ids.xml
new file mode 100644
index 0000000..f551102
--- /dev/null
+++ b/app/src/main/res/values/ids.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- IDs referenced from Mirror.java that live only in the debug
+ layout (src/debug/res/layout/mirror.xml). Declaring them here
+ means R.id.* is stable across both build types; findViewById
+ returns null in release where the views are absent. -->
+<resources>
+ <item name="overlay_target" type="id"/>
+ <item name="overlay_stats" type="id"/>
+ <item name="overlay_event" type="id"/>
+</resources>
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..a9a552c
--- /dev/null
+++ b/app/src/main/res/values/strings.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="app_name">scrcpy</string>
+ <string name="host_hint">192.168.1.42</string>
+ <string name="pair_port_hint">37123</string>
+ <string name="pair_code_hint">6 digits</string>
+ <string name="connect_port_hint">41234</string>
+ <string name="pair_help">On the target: Settings &gt; Developer options &gt; Wireless debugging</string>
+ <string name="label_host">Host / IP address</string>
+ <string name="label_pairing">Pairing port and code</string>
+ <string name="sub_pairing">From the “Pair device with pairing code” dialog</string>
+ <string name="label_connect">Connection port</string>
+ <string name="sub_connect">Shown on the Wireless debugging screen</string>
+ <string name="pair_and_save">Pair and save</string>
+ <string name="pair_a_device">Pair a device</string>
+ <string name="saved_devices">Saved devices</string>
+ <string name="notif_session_active">Mirroring active</string>
+ <string name="settings">Settings</string>
+ <string name="video_codec">Video codec</string>
+ <string name="audio_codec">Audio codec</string>
+ <string name="forget_device">Forget device?</string>
+ <string name="max_size">Max size (long edge, px)</string>
+ <string name="video_bit_rate">Video bit rate</string>
+ <string name="max_fps">Max fps</string>
+ <string name="reconnect">Reconnect</string>
+ <string name="connecting">connecting…</string>
+ <string name="disconnected">disconnected</string>
+ <string name="record">Record</string>
+ <string name="record_on">Stop recording</string>
+ <string name="hint_long_press_back">Long-press Back to send it to the target device.</string>
+ <string name="pairing">Pairing…</string>
+ <string name="settings_apply_on_reconnect">Changes apply on the next connection.</string>
+ <string name="display">Display</string>
+ <string name="show_status_bar">Show status bar (IP, resolution, Record) while mirroring</string>
+ <string name="no_devices_yet">No devices paired yet - fill the fields above and tap Pair.</string>
+</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..d0b07ac
--- /dev/null
+++ b/app/src/main/res/values/styles.xml
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Reusable widget styles. Applied per-widget via style="@style/..." so
+ behaviour stays explicit and visible at the call site. -->
+<resources>
+ <style name="Card">
+ <item name="android:orientation">vertical</item>
+ <item name="android:background">@drawable/bg_card</item>
+ <item name="android:padding">@dimen/card_padding</item>
+ <item name="android:layout_marginBottom">@dimen/space_lg</item>
+ </style>
+
+ <style name="SectionHeader">
+ <item name="android:textColor">@color/on_surface</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:paddingBottom">@dimen/space_sm</item>
+ </style>
+
+ <style name="Field" parent="@android:style/Widget.Material.EditText">
+ <item name="android:background">@drawable/bg_field</item>
+ <item name="android:textColor">@color/on_surface</item>
+ <item name="android:textColorHint">@color/on_surface_muted</item>
+ <item name="android:paddingHorizontal">@dimen/space_md</item>
+ <item name="android:paddingVertical">@dimen/space_md</item>
+ <item name="android:minHeight">@dimen/touch_min</item>
+ </style>
+
+ <style name="Button.Primary" parent="@android:style/Widget.Material.Button">
+ <item name="android:background">@drawable/btn_primary</item>
+ <item name="android:textColor">@color/on_accent</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:minHeight">@dimen/touch_min</item>
+ </style>
+
+ <style name="Button.Secondary" parent="@android:style/Widget.Material.Button">
+ <item name="android:background">@drawable/btn_secondary</item>
+ <item name="android:textColor">@color/accent</item>
+ <item name="android:textAllCaps">false</item>
+ <item name="android:minWidth">0dp</item>
+ </style>
+
+ <style name="RadioOption">
+ <item name="android:textColor">@color/on_surface</item>
+ <item name="android:textSize">15sp</item>
+ <item name="android:paddingTop">@dimen/space_sm</item>
+ <item name="android:paddingBottom">@dimen/space_sm</item>
+ <item name="android:minHeight">44dp</item>
+ </style>
+
+ <style name="Note">
+ <item name="android:textStyle">italic</item>
+ <item name="android:textColor">@color/on_surface_muted</item>
+ </style>
+
+ <style name="FieldLabel">
+ <item name="android:textColor">@color/on_surface</item>
+ <item name="android:textSize">13sp</item>
+ <item name="android:textStyle">bold</item>
+ <item name="android:paddingTop">@dimen/space_md</item>
+ </style>
+
+ <style name="Caption">
+ <item name="android:textColor">@color/on_surface_muted</item>
+ <item name="android:textSize">12sp</item>
+ </style>
+
+ <style name="DeviceLabel">
+ <item name="android:textColor">@color/on_surface</item>
+ <item name="android:textSize">16sp</item>
+ <item name="android:fontFamily">monospace</item>
+ </style>
+</resources>
diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml
new file mode 100644
index 0000000..3d702c6
--- /dev/null
+++ b/app/src/main/res/values/themes.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Custom theme on the platform's built-in Material theme (ships with
+ Android, not a dependency). Setting the colour attributes makes the
+ framework auto-tint EditText focus, radio buttons, checkboxes, the
+ action bar, and the cursor. NoActionBar / Fullscreen inherit the
+ same colours via dotted-name inheritance. -->
+<resources>
+ <style name="Theme.Scrcpy" parent="@android:style/Theme.Material">
+ <item name="android:colorBackground">@color/bg</item>
+ <item name="android:windowBackground">@color/bg</item>
+ <item name="android:colorPrimary">@color/surface</item>
+ <item name="android:colorPrimaryDark">@color/bg</item>
+ <item name="android:colorAccent">@color/accent</item>
+ <item name="android:textColorPrimary">@color/on_surface</item>
+ <item name="android:textColorSecondary">@color/on_surface_muted</item>
+ <item name="android:textColorHint">@color/on_surface_muted</item>
+ <item name="android:statusBarColor">@color/bg</item>
+ <item name="android:navigationBarColor">@color/bg</item>
+ </style>
+
+ <style name="Theme.Scrcpy.NoActionBar">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ </style>
+
+ <style name="Theme.Scrcpy.Fullscreen">
+ <item name="android:windowActionBar">false</item>
+ <item name="android:windowNoTitle">true</item>
+ <item name="android:windowFullscreen">true</item>
+ <item name="android:windowBackground">@android:color/black</item>
+ </style>
+</resources>