Move all bottom sheet fragments to package BottomSheetFragment. Add a UrlMenuBottomSheetFragment for future use.

This commit is contained in:
Alex Ning
2020-06-08 21:11:01 +08:00
parent b8e4ce6e1d
commit 0dbb6a745f
44 changed files with 236 additions and 61 deletions

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"
android:fillColor="#FFFFFF"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M19,19H5V5h7V3H5c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2v-7h-2v7zM14,3v2h3.59l-9.83,9.83 1.41,1.41L19,6.41V10h2V3h-7z"
android:fillColor="#000000"/>
</vector>

View File

@@ -5,7 +5,7 @@
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:overScrollMode="never"
tools:context=".Fragment.SortTimeBottomSheetFragment">
tools:context=".BottomSheetFragment.CopyTextBottomSheetFragment">
<LinearLayout
android:layout_width="match_parent"

View File

@@ -4,7 +4,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:overScrollMode="never"
tools:context=".Fragment.PostCommentSortTypeBottomSheetFragment">
tools:context=".BottomSheetFragment.PostCommentSortTypeBottomSheetFragment">
<LinearLayout
android:layout_width="match_parent"

View File

@@ -5,7 +5,7 @@
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:overScrollMode="never"
tools:context=".Fragment.PostLayoutBottomSheetFragment">
tools:context=".BottomSheetFragment.PostLayoutBottomSheetFragment">
<LinearLayout
android:layout_width="match_parent"

View File

@@ -5,7 +5,7 @@
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:overScrollMode="never"
tools:context=".Fragment.SortTimeBottomSheetFragment">
tools:context=".BottomSheetFragment.SortTimeBottomSheetFragment">
<LinearLayout
android:layout_width="match_parent"

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="8dp"
android:overScrollMode="never"
tools:context=".BottomSheetFragment.UrlMenuBottomSheetFragment">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
android:id="@+id/open_link_text_view_url_menu_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/copy_raw_text"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:drawableStart="@drawable/ic_open_link_24dp"
android:drawablePadding="48dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/copy_link_text_view_url_menu_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/copy_markdown"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:drawableStart="@drawable/ic_copy_24dp"
android:drawablePadding="48dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
<TextView
android:id="@+id/share_link_text_view_url_menu_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/copy_all_raw_text"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default"
android:paddingTop="16dp"
android:paddingBottom="16dp"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:drawableStart="@drawable/ic_share_24dp"
android:drawablePadding="48dp"
android:clickable="true"
android:focusable="true"
android:background="?attr/selectableItemBackground" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@@ -754,5 +754,7 @@
<string name="downloading_reddit_video_failed_cannot_save_audio">Download failed: cannot save audio to cache directory</string>
<string name="downloading_reddit_video_failed_cannot_mux">Download failed: cannot mux video and audio</string>
<string name="downloading_reddit_video_failed_cannot_save_mux_video">Download failed: cannot save the video to public directory</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>