Enable scrolling in screen flash color selector dialog
Screen flash color selector dialog doesn't display correctly in landscappe mode when adjust to large display size from 'Accessibility > Display size and text > Display size'. Make the layout be scrollable to prevent strange clipped UI. Bug:287671988 Test: check the UI manually Change-Id: I37eb604d362fe4373d26f97a9397230babc6eafd
This commit is contained in:
@@ -14,161 +14,167 @@
|
|||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/color_selector_root_view"
|
android:id="@+id/color_selector_root_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:minHeight="?android:attr/listPreferredItemHeight"
|
android:padding="20dp"
|
||||||
android:orientation="vertical">
|
android:clipToPadding="false"
|
||||||
|
android:scrollbarStyle="outsideOverlay">
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="10dp"
|
android:minHeight="?android:attr/listPreferredItemHeight"
|
||||||
android:orientation="horizontal">
|
android:orientation="vertical">
|
||||||
|
<LinearLayout
|
||||||
<RadioButton
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/color_radio_button_00"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_01_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_blue" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/color_radio_button_01"
|
android:id="@+id/color_radio_button_00"
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
android:button="@drawable/screen_flash_color_02_selector"
|
android:button="@drawable/screen_flash_color_01_selector"
|
||||||
android:contentDescription="@string/screen_flash_color_azure" />
|
android:contentDescription="@string/screen_flash_color_blue" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_01"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_02_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_azure" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_02"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_03_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_cyan" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_03"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_04_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_spring_green" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/color_radio_button_02"
|
android:id="@+id/color_radio_button_04"
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
android:button="@drawable/screen_flash_color_03_selector"
|
android:button="@drawable/screen_flash_color_05_selector"
|
||||||
android:contentDescription="@string/screen_flash_color_cyan" />
|
android:contentDescription="@string/screen_flash_color_green" />
|
||||||
|
|
||||||
<Space
|
<Space
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_05"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_06_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_chartreuse_green" />
|
||||||
|
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_06"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_07_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_yellow" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_07"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_08_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_orange" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1" />
|
android:layout_marginBottom="10dp"
|
||||||
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<RadioButton
|
<RadioButton
|
||||||
android:id="@+id/color_radio_button_03"
|
android:id="@+id/color_radio_button_08"
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
android:button="@drawable/screen_flash_color_04_selector"
|
android:button="@drawable/screen_flash_color_09_selector"
|
||||||
android:contentDescription="@string/screen_flash_color_spring_green" />
|
android:contentDescription="@string/screen_flash_color_red" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_09"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_10_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_rose" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_10"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_11_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_magenta" />
|
||||||
|
|
||||||
|
<Space
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1" />
|
||||||
|
|
||||||
|
<RadioButton
|
||||||
|
android:id="@+id/color_radio_button_11"
|
||||||
|
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
||||||
|
android:button="@drawable/screen_flash_color_12_selector"
|
||||||
|
android:contentDescription="@string/screen_flash_color_violet" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_04"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_05_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_green" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_05"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_06_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_chartreuse_green" />
|
|
||||||
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_06"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_07_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_yellow" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_07"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_08_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_orange" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="10dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_08"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_09_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_red" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_09"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_10_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_rose" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_10"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_11_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_magenta" />
|
|
||||||
|
|
||||||
<Space
|
|
||||||
android:layout_width="0dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_weight="1" />
|
|
||||||
|
|
||||||
<RadioButton
|
|
||||||
android:id="@+id/color_radio_button_11"
|
|
||||||
android:layout_width="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:layout_height="@dimen/screen_flash_color_button_frame_size"
|
|
||||||
android:button="@drawable/screen_flash_color_12_selector"
|
|
||||||
android:contentDescription="@string/screen_flash_color_violet" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</LinearLayout>
|
|
||||||
|
@@ -17,16 +17,12 @@
|
|||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:gravity="center_horizontal"
|
||||||
android:paddingBottom="24dp">
|
android:orientation="vertical">
|
||||||
|
|
||||||
<com.android.settings.accessibility.ColorSelectorLayout
|
<com.android.settings.accessibility.ColorSelectorLayout
|
||||||
android:id="@+id/color_selector_preference"
|
android:id="@+id/color_selector_preference"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"/>
|
||||||
android:layout_marginBottom="2dp"
|
|
||||||
android:layout_marginHorizontal="25dp"
|
|
||||||
android:layout_marginTop="21dp"
|
|
||||||
android:orientation="vertical" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
Reference in New Issue
Block a user