aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2020-11-24 07:24:35 +0000
committerAlex Ning <chineseperson5@gmail.com>2020-11-24 07:24:35 +0000
commitb66d5fa1686c758f5faec9ee93c8c13ab0fbdde4 (patch)
treef806f199b636028acc5d53f8da91074e47a47ecf /app
parentdae9eba033d3af8746925aa7039cc2807def0efc (diff)
downloadinfinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.tar
infinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.tar.gz
infinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.tar.bz2
infinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.tar.lz
infinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.tar.xz
infinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.tar.zst
infinity-for-reddit-b66d5fa1686c758f5faec9ee93c8c13ab0fbdde4.zip
Make color picker dialog scrollable.
Diffstat (limited to 'app')
-rw-r--r--app/src/main/res/layout/color_picker.xml284
1 files changed, 145 insertions, 139 deletions
diff --git a/app/src/main/res/layout/color_picker.xml b/app/src/main/res/layout/color_picker.xml
index b8769926..439f4e92 100644
--- a/app/src/main/res/layout/color_picker.xml
+++ b/app/src/main/res/layout/color_picker.xml
@@ -1,165 +1,171 @@
<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout
- xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:orientation="vertical">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingTop="12dp"
- android:paddingBottom="12dp"
- android:paddingStart="24dp"
- android:paddingEnd="24dp"
- android:text="@string/color_picker"
- android:fontFamily="?attr/font_family"
- style="@style/MaterialAlertDialogTitleTextStyle" />
-
- <View
- android:id="@+id/color_view_color_picker"
- android:layout_width="match_parent"
- android:layout_height="200dp" />
-
- <LinearLayout
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_gravity="center_horizontal">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="#"
- android:textColor="?attr/primaryTextColor"
- android:fontFamily="?attr/font_family" />
-
- <EditText
- android:id="@+id/color_edit_text_color_picker"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:gravity="center"
- android:maxLength="8"
- android:inputType="textCapCharacters|textNoSuggestions"
- android:textColor="?attr/primaryTextColor"
- android:fontFamily="?attr/font_family" />
-
- </LinearLayout>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:paddingTop="16dp"
- android:paddingBottom="8dp"
- android:paddingStart="32dp"
- android:paddingEnd="32dp">
+ android:orientation="vertical">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="A"
- android:textColor="?attr/primaryTextColor"
- android:fontFamily="?attr/font_family" />
+ android:paddingTop="12dp"
+ android:paddingBottom="12dp"
+ android:paddingStart="24dp"
+ android:paddingEnd="24dp"
+ android:text="@string/color_picker"
+ android:fontFamily="?attr/font_family"
+ style="@style/MaterialAlertDialogTitleTextStyle" />
- <SeekBar
- android:id="@+id/a_seek_bar_color_picker"
+ <View
+ android:id="@+id/color_view_color_picker"
android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:max="255" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:paddingStart="32dp"
- android:paddingEnd="32dp">
+ android:layout_height="200dp" />
- <TextView
+ <LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="R"
- android:textColor="?attr/primaryTextColor"
- android:fontFamily="?attr/font_family" />
-
- <SeekBar
- android:id="@+id/r_seek_bar_color_picker"
+ android:layout_gravity="center_horizontal">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="#"
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
+
+ <EditText
+ android:id="@+id/color_edit_text_color_picker"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:gravity="center"
+ android:maxLength="8"
+ android:inputType="textCapCharacters|textNoSuggestions"
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
+
+ </LinearLayout>
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:max="255" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="8dp"
- android:paddingBottom="8dp"
- android:paddingStart="32dp"
- android:paddingEnd="32dp">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="G"
- android:textColor="?attr/primaryTextColor"
- android:fontFamily="?attr/font_family" />
-
- <SeekBar
- android:id="@+id/g_seek_bar_color_picker"
+ android:paddingTop="16dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="A"
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
+
+ <SeekBar
+ android:id="@+id/a_seek_bar_color_picker"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="255" />
+
+ </LinearLayout>
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:max="255" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:paddingTop="8dp"
- android:paddingBottom="32dp"
- android:paddingStart="32dp"
- android:paddingEnd="32dp">
-
- <TextView
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="B"
- android:textColor="?attr/primaryTextColor"
- android:fontFamily="?attr/font_family" />
-
- <SeekBar
- android:id="@+id/b_seek_bar_color_picker"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="R"
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
+
+ <SeekBar
+ android:id="@+id/r_seek_bar_color_picker"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="255" />
+
+ </LinearLayout>
+
+ <LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:max="255" />
-
- </LinearLayout>
-
- <LinearLayout
- android:layout_gravity="end"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:paddingBottom="4dp"
- android:paddingStart="12dp"
- android:paddingEnd="12dp">
-
- <Button
- android:id="@+id/cancel_button_color_picker"
- android:layout_width="wrap_content"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="G"
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
+
+ <SeekBar
+ android:id="@+id/g_seek_bar_color_picker"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="255" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:text="@string/cancel"
- android:fontFamily="?attr/font_family"
- style="@style/MaterialAlertDialogNegativeButtonStyle" />
-
- <Button
- android:id="@+id/ok_button_color_picker"
+ android:paddingTop="8dp"
+ android:paddingBottom="32dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp">
+
+ <TextView
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="B"
+ android:textColor="?attr/primaryTextColor"
+ android:fontFamily="?attr/font_family" />
+
+ <SeekBar
+ android:id="@+id/b_seek_bar_color_picker"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:max="255" />
+
+ </LinearLayout>
+
+ <LinearLayout
+ android:layout_gravity="end"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:text="@string/ok"
- android:fontFamily="?attr/font_family"
- style="@style/MaterialAlertDialogPositiveButtonStyle" />
+ android:paddingBottom="4dp"
+ android:paddingStart="12dp"
+ android:paddingEnd="12dp">
+
+ <Button
+ android:id="@+id/cancel_button_color_picker"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/cancel"
+ android:fontFamily="?attr/font_family"
+ style="@style/MaterialAlertDialogNegativeButtonStyle" />
+
+ <Button
+ android:id="@+id/ok_button_color_picker"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/ok"
+ android:fontFamily="?attr/font_family"
+ style="@style/MaterialAlertDialogPositiveButtonStyle" />
+
+ </LinearLayout>
</LinearLayout>
-</LinearLayout> \ No newline at end of file
+</ScrollView> \ No newline at end of file