Merge pull request #4201 from koh6uawi/scroll_select_font_size

Make the font size selection dialog scrollable
This commit is contained in:
Benoit Marty 2021-10-12 18:33:11 +02:00 committed by GitHub
commit 37dbaadbcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 77 additions and 72 deletions

1
changelog.d/4201.bugfix Normal file
View File

@ -0,0 +1 @@
Make the font size selection dialog scrollable

View File

@ -1,83 +1,87 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/text_selection_group_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="?dialogPreferredPadding"
android:paddingTop="12dp"
android:paddingEnd="?dialogPreferredPadding"
tools:ignore="SpUsage">
<!-- keep the sizes in dp -->
<CheckedTextView
android:id="@+id/text_selection_tiny_text_view"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/text_selection_group_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/tiny"
android:textSize="10dp" />
android:orientation="vertical"
android:paddingStart="?dialogPreferredPadding"
android:paddingTop="12dp"
android:paddingEnd="?dialogPreferredPadding"
tools:ignore="SpUsage">
<CheckedTextView
android:id="@+id/text_selection_small_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/small"
android:textSize="12dp" />
<!-- keep the sizes in dp -->
<CheckedTextView
android:id="@+id/text_selection_tiny_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/tiny"
android:textSize="10dp" />
<CheckedTextView
android:id="@+id/text_selection_normal_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/normal"
android:textSize="14dp" />
<CheckedTextView
android:id="@+id/text_selection_small_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/small"
android:textSize="12dp" />
<CheckedTextView
android:id="@+id/text_selection_large_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/large"
android:textSize="16dp" />
<CheckedTextView
android:id="@+id/text_selection_normal_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/normal"
android:textSize="14dp" />
<CheckedTextView
android:id="@+id/text_selection_larger_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/larger"
android:textSize="18dp" />
<CheckedTextView
android:id="@+id/text_selection_large_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/large"
android:textSize="16dp" />
<CheckedTextView
android:id="@+id/text_selection_largest_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/largest"
android:textSize="20dp" />
<CheckedTextView
android:id="@+id/text_selection_larger_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/larger"
android:textSize="18dp" />
<CheckedTextView
android:id="@+id/text_selection_huge_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/huge"
android:textSize="22dp" />
</LinearLayout>
<CheckedTextView
android:id="@+id/text_selection_largest_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/largest"
android:textSize="20dp" />
<CheckedTextView
android:id="@+id/text_selection_huge_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:checkMark="?android:attr/listChoiceIndicatorSingle"
android:gravity="center_vertical"
android:text="@string/huge"
android:textSize="22dp" />
</LinearLayout>
</ScrollView>