diff options
author | Alex Ning <chineseperson5@gmail.com> | 2019-07-26 15:31:48 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2019-07-26 15:31:48 +0000 |
commit | 40fc423b337352e1a47e361dac052213bb81ee26 (patch) | |
tree | c79667c0b51f15046661dacbcdf0d018178b1854 /app/src/main/res | |
parent | 1fc84239069fa19da7f7c7b0b0825717aad4999c (diff) | |
download | infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.tar infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.tar.gz infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.tar.bz2 infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.tar.lz infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.tar.xz infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.tar.zst infinity-for-reddit-40fc423b337352e1a47e361dac052213bb81ee26.zip |
Use rounded corner bottom fragment. Tweak bottom sheet fragment UI. Change post type bottom sheet dialog to fragment. Exit SearchActivity no matter searchview is open or not.
Diffstat (limited to '')
-rw-r--r-- | app/src/main/res/layout/fragment_post_type_bottom_sheet.xml (renamed from app/src/main/res/layout/post_type_bottom_sheet.xml) | 52 | ||||
-rw-r--r-- | app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml | 60 | ||||
-rw-r--r-- | app/src/main/res/layout/sort_type_bottom_sheet.xml | 97 | ||||
-rw-r--r-- | app/src/main/res/values/colors.xml | 2 | ||||
-rw-r--r-- | app/src/main/res/values/dimens.xml | 3 |
5 files changed, 71 insertions, 143 deletions
diff --git a/app/src/main/res/layout/post_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml index 092495c4..1e3659d1 100644 --- a/app/src/main/res/layout/post_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml @@ -1,20 +1,27 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:paddingBottom="8dp"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:paddingTop="24dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:text="@string/bottom_sheet_post_type" android:textSize="18sp" /> <LinearLayout - android:id="@+id/text_type_linear_layout_post_type_bottom_sheet" + android:id="@+id/text_type_linear_layout_post_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" > @@ -31,17 +38,18 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_text" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" /> + android:text="@string/bottom_sheet_post_text" /> </LinearLayout> <LinearLayout - android:id="@+id/link_type_linear_layout_post_type_bottom_sheet" + android:id="@+id/link_type_linear_layout_post_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" > @@ -58,17 +66,18 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_link" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" /> + android:text="@string/bottom_sheet_post_link" /> </LinearLayout> <LinearLayout - android:id="@+id/image_type_linear_layout_post_type_bottom_sheet" + android:id="@+id/image_type_linear_layout_post_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" > @@ -85,18 +94,19 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_image" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" /> + android:text="@string/bottom_sheet_post_image" /> </LinearLayout> <LinearLayout - android:id="@+id/video_type_linear_layout_post_type_bottom_sheet" + android:id="@+id/video_type_linear_layout_post_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" > @@ -113,9 +123,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:text="@string/bottom_sheet_post_video" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" /> + android:text="@string/bottom_sheet_post_video" /> </LinearLayout> diff --git a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml index bdf38858..d3977d81 100644 --- a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml @@ -1,13 +1,18 @@ <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent"> + android:layout_height="match_parent" + android:paddingBottom="8dp"> <TextView android:layout_width="match_parent" android:layout_height="wrap_content" - android:padding="16dp" + android:paddingTop="24dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:text="@string/sort" + android:textColor="@color/primaryTextColor" android:textSize="18sp" /> <TextView @@ -15,9 +20,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_best" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> @@ -27,9 +33,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_hot" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> @@ -39,9 +46,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_new" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> @@ -51,9 +59,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_random" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> @@ -63,9 +72,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_rising" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> @@ -75,9 +85,10 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_top" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> @@ -86,10 +97,11 @@ android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet_fragment" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="@string/sort_rising" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" + android:text="@string/sort_controversial" + android:paddingTop="16dp" + android:paddingBottom="16dp" + android:paddingStart="32dp" + android:paddingEnd="32dp" android:clickable="true" android:focusable="true" android:background="?attr/selectableItemBackground" /> diff --git a/app/src/main/res/layout/sort_type_bottom_sheet.xml b/app/src/main/res/layout/sort_type_bottom_sheet.xml deleted file mode 100644 index 5951b431..00000000 --- a/app/src/main/res/layout/sort_type_bottom_sheet.xml +++ /dev/null @@ -1,97 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:orientation="vertical" android:layout_width="match_parent" - android:layout_height="match_parent"> - - <TextView - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:padding="16dp" - android:text="@string/sort" - android:textSize="18sp" /> - - <TextView - android:id="@+id/best_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_best" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - - <TextView - android:id="@+id/hot_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_hot" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - - <TextView - android:id="@+id/new_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_new" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - - <TextView - android:id="@+id/random_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_random" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - - <TextView - android:id="@+id/rising_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_rising" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - - <TextView - android:id="@+id/top_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_top" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - - <TextView - android:id="@+id/controversial_type_text_view_sort_type_bottom_sheet" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:text="@string/sort_rising" - android:textColor="@color/primaryTextColor" - android:textSize="18sp" - android:padding="16dp" - android:clickable="true" - android:focusable="true" - android:background="?attr/selectableItemBackground" /> - -</LinearLayout>
\ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 1112f7b3..a4f27cd2 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -23,4 +23,6 @@ <color name="backgroundColor">#FFFFFF</color> <color name="backgroundColorPrimaryDark">@color/colorPrimaryDark</color> + + <color name="roundedBottomSheetPrimaryNavigationBarColor">#000000</color> </resources> diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 5a6277cf..ddc21110 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -7,4 +7,7 @@ <dimen name="fab_margin">16dp</dimen> <dimen name="app_bar_height">180dp</dimen> <dimen name="text_margin">16dp</dimen> + <dimen name="roundedBottomSheetCornerRadiusTopPadding">0dp</dimen> + <dimen name="roundedBottomSheetCornerRadiusLeftPadding">0dp</dimen> + <dimen name="roundedBottomSheetCornerRadiusRightPadding">0dp</dimen> </resources>
\ No newline at end of file |