Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 174 additions & 21 deletions packages/SystemUI/res/layout/screen_record_options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,14 @@
android:dropDownWidth="274dp"
android:importantForAccessibility="yes"/>

<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:minWidth="48dp"
android:layout_height="48dp"
android:layout_gravity="end"
android:id="@+id/screenrecord_audio_switch"
android:contentDescription="@string/screenrecord_audio_label"
style="@style/ScreenRecord.Switch"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:importantForAccessibility="yes" />
</LinearLayout>
<LinearLayout
Expand Down Expand Up @@ -76,13 +76,13 @@
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_taps_label"/>

<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:minWidth="48dp"
android:layout_height="48dp"
android:id="@+id/screenrecord_taps_switch"
android:contentDescription="@string/screenrecord_taps_label"
style="@style/ScreenRecord.Switch"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:importantForAccessibility="yes" />
</LinearLayout>
<LinearLayout
Expand All @@ -91,7 +91,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
android:layout_marginTop="@dimen/screenrecord_option_padding"
android:visibility="gone">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
Expand Down Expand Up @@ -123,13 +124,13 @@
android:textColor="?android:textColorSecondary"/>
</LinearLayout>

<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:minWidth="48dp"
android:layout_height="48dp"
android:id="@+id/screenrecord_lowquality_switch"
android:contentDescription="@string/screenrecord_lowquality_label"
style="@style/ScreenRecord.Switch"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:importantForAccessibility="yes" />
</LinearLayout>
<LinearLayout
Expand All @@ -138,7 +139,8 @@
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
android:layout_marginTop="@dimen/screenrecord_option_padding"
android:visibility="gone">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
Expand Down Expand Up @@ -170,13 +172,13 @@
android:textColor="?android:textColorSecondary"/>
</LinearLayout>

<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:minWidth="48dp"
android:layout_height="48dp"
android:id="@+id/screenrecord_longer_timeout_switch"
android:contentDescription="@string/screenrecord_longer_timeout_switch_label"
style="@style/ScreenRecord.Switch"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:importantForAccessibility="yes" />
</LinearLayout>
<LinearLayout
Expand All @@ -202,10 +204,8 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@*android:string/config_bodyFontFamily"
android:text="@string/screenrecord_skip_time_label"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_skip_time_label"/>
<TextView
android:layout_width="match_parent"
Expand All @@ -217,15 +217,170 @@
android:textColor="?android:textColorSecondary"/>
</LinearLayout>

<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:minWidth="48dp"
android:layout_height="48dp"
android:id="@+id/screenrecord_skip_time_switch"
android:contentDescription="@string/screenrecord_skip_time_label"
style="@style/ScreenRecord.Switch"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:importantForAccessibility="yes" />
</LinearLayout>
<LinearLayout
android:id="@+id/show_bitrate"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
android:src="@drawable/ic_sr_quality"
android:tint="?android:attr/textColorSecondary"
android:layout_marginEnd="@dimen/screenrecord_option_padding"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="48dp"
android:text="@string/screenrecord_bitrate_label"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_bitrate_label"/>
<Spinner
android:id="@+id/screenrecord_bitrate_spinner"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:dropDownWidth="wrap_content"
android:popupBackground="@drawable/screenrecord_spinner_background"
android:importantForAccessibility="yes"/>
</LinearLayout>
<LinearLayout
android:id="@+id/show_resolution"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
android:src="@drawable/ic_sr_quality"
android:tint="?android:attr/textColorSecondary"
android:layout_marginEnd="@dimen/screenrecord_option_padding"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="48dp"
android:text="@string/screenrecord_resolution_label"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_resolution_label"/>
<Spinner
android:id="@+id/screenrecord_resolution_spinner"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:dropDownWidth="wrap_content"
android:popupBackground="@drawable/screenrecord_spinner_background"
android:importantForAccessibility="yes"/>
</LinearLayout>
<LinearLayout
android:id="@+id/show_fps"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
android:src="@drawable/ic_sr_clock"
android:tint="?android:attr/textColorSecondary"
android:layout_marginEnd="@dimen/screenrecord_option_padding"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="48dp"
android:text="@string/screenrecord_fps_label"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_fps_label"/>
<Spinner
android:id="@+id/screenrecord_fps_spinner"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:dropDownWidth="wrap_content"
android:popupBackground="@drawable/screenrecord_spinner_background"
android:importantForAccessibility="yes"/>
</LinearLayout>
<LinearLayout
android:id="@+id/show_time_limit"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
android:src="@drawable/ic_sr_clock"
android:tint="?android:attr/textColorSecondary"
android:layout_marginEnd="@dimen/screenrecord_option_padding"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="48dp"
android:text="@string/screenrecord_time_limit_label"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_time_limit_label"/>
<Spinner
android:id="@+id/screenrecord_time_limit_spinner"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:dropDownWidth="wrap_content"
android:popupBackground="@drawable/screenrecord_spinner_background"
android:importantForAccessibility="yes"/>
</LinearLayout>
<LinearLayout
android:id="@+id/show_file_size"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_marginTop="@dimen/screenrecord_option_padding">
<ImageView
android:layout_width="@dimen/screenrecord_option_icon_size"
android:layout_height="@dimen/screenrecord_option_icon_size"
android:src="@drawable/ic_storage"
android:tint="?android:attr/textColorSecondary"
android:layout_marginEnd="@dimen/screenrecord_option_padding"
android:importantForAccessibility="no"/>
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="center_vertical"
android:minHeight="48dp"
android:text="@string/screenrecord_file_size_label"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_file_size_label"/>
<Spinner
android:id="@+id/screenrecord_file_size_spinner"
android:layout_width="wrap_content"
android:layout_height="48dp"
android:dropDownWidth="wrap_content"
android:popupBackground="@drawable/screenrecord_spinner_background"
android:importantForAccessibility="yes"/>
</LinearLayout>
<LinearLayout
android:id="@+id/show_hevc"
android:layout_width="match_parent"
Expand All @@ -249,10 +404,8 @@
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fontFamily="@*android:string/config_bodyFontFamily"
android:text="@string/screenrecord_hevc_switch_label"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="?android:attr/textColorPrimary"
android:textAppearance="@style/TextAppearance.ScreenRecord.SwitchLabel"
android:contentDescription="@string/screenrecord_hevc_switch_label"/>
<TextView
android:layout_width="match_parent"
Expand All @@ -264,13 +417,13 @@
android:textColor="?android:textColorSecondary"/>
</LinearLayout>

<Switch
<com.google.android.material.materialswitch.MaterialSwitch
android:layout_width="wrap_content"
android:minWidth="48dp"
android:layout_height="48dp"
android:id="@+id/screenrecord_hevc_switch"
android:contentDescription="@string/screenrecord_hevc_switch_label"
style="@style/ScreenRecord.Switch"
android:theme="@style/Theme.Material3.DynamicColors.DayNight"
android:importantForAccessibility="yes" />
</LinearLayout>
</LinearLayout>
</LinearLayout>
24 changes: 24 additions & 0 deletions packages/SystemUI/res/layout/screenrecord_spinner_item.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2025-2026 AxionOS Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/text1"
style="?android:attr/spinnerItemStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="end|center_vertical"
android:singleLine="true"
android:ellipsize="end" />
23 changes: 23 additions & 0 deletions packages/SystemUI/res/values/cm_strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,29 @@
<string name="screenrecord_skip_time_summary">Remove the 3 second wait</string>
<string name="screenrecord_hevc_switch_label">HEVC encoding</string>
<string name="screenrecord_hevc_switch_summary">Use the more efficient HEVC encoder</string>
<string name="screenrecord_resolution_label">Resolution</string>
<string name="screenrecord_fps_label">Frame rate</string>
<string name="screenrecord_time_limit_label">Time limit</string>
<string name="screenrecord_file_size_label">File size limit</string>
<string name="screenrecord_bitrate_label">Video quality</string>
<string name="screenrecord_bitrate_high">High</string>
<string name="screenrecord_bitrate_medium">Medium</string>
<string name="screenrecord_bitrate_low">Low</string>
<string name="screenrecord_resolution_auto">Auto</string>
<string name="screenrecord_fps_auto">Auto</string>
<string name="screenrecord_fps_30">30 FPS</string>
<string name="screenrecord_fps_60">60 FPS</string>
<string name="screenrecord_time_unlimited">Unlimited</string>
<string name="screenrecord_time_5min">5 minutes</string>
<string name="screenrecord_time_10min">10 minutes</string>
<string name="screenrecord_time_30min">30 minutes</string>
<string name="screenrecord_time_60min">60 minutes</string>
<string name="screenrecord_size_unlimited">Unlimited</string>
<string name="screenrecord_size_10mb">10 MB</string>
<string name="screenrecord_size_100mb">100 MB</string>
<string name="screenrecord_size_500mb">500 MB</string>
<string name="screenrecord_size_1gb">1 GB</string>
<string name="screenrecord_size_15gb">15 GB</string>

<!-- Screen pinning dialog description. (for devices without navbar) -->
<string name="screen_pinning_description_no_navbar">This keeps it in view until you unpin. Touch &amp; hold Back to unpin.</string>
Expand Down
Loading