aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/res
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/src/main/res/layout/copy_text_material_dialog.xml19
-rw-r--r--app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml77
-rw-r--r--app/src/main/res/layout/item_post_detail.xml6
-rw-r--r--app/src/main/res/values/strings.xml6
-rw-r--r--app/src/main/res/values/styles.xml6
5 files changed, 113 insertions, 1 deletions
diff --git a/app/src/main/res/layout/copy_text_material_dialog.xml b/app/src/main/res/layout/copy_text_material_dialog.xml
new file mode 100644
index 00000000..a8dfb7a5
--- /dev/null
+++ b/app/src/main/res/layout/copy_text_material_dialog.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content">
+
+ <TextView
+ android:id="@+id/text_view_copy_text_material_dialog"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingTop="8dp"
+ android:paddingBottom="8dp"
+ android:paddingStart="24dp"
+ android:paddingEnd="24dp"
+ android:textIsSelectable="true"
+ android:enabled="true"
+ android:focusable="true"
+ android:longClickable="true" />
+
+</ScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml b/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml
new file mode 100644
index 00000000..43044ca2
--- /dev/null
+++ b/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml
@@ -0,0 +1,77 @@
+<?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=".Fragment.SortTimeBottomSheetFragment">
+
+ <LinearLayout
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical">
+
+ <TextView
+ android:id="@+id/copy_raw_text_text_view_copy_text_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/copy_raw_text"
+ android:textColor="@color/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/copy_markdown_text_view_copy_text_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/copy_markdown"
+ android:textColor="@color/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/copy_all_raw_text_text_view_copy_text_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/copy_all_raw_text"
+ android:textColor="@color/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ <TextView
+ android:id="@+id/copy_all_markdown_text_view_copy_text_bottom_sheet_fragment"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/copy_all_markdown"
+ android:textColor="@color/primaryTextColor"
+ android:textSize="?attr/font_default"
+ android:paddingTop="16dp"
+ android:paddingBottom="16dp"
+ android:paddingStart="32dp"
+ android:paddingEnd="32dp"
+ android:clickable="true"
+ android:focusable="true"
+ android:background="?attr/selectableItemBackground" />
+
+ </LinearLayout>
+
+</androidx.core.widget.NestedScrollView> \ No newline at end of file
diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml
index e23da92c..1ccdf2a1 100644
--- a/app/src/main/res/layout/item_post_detail.xml
+++ b/app/src/main/res/layout/item_post_detail.xml
@@ -79,7 +79,11 @@
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:textColor="@color/primaryTextColor"
- android:textSize="?attr/title_font_18" />
+ android:textSize="?attr/title_font_18"
+ android:textIsSelectable="true"
+ android:enabled="true"
+ android:focusable="true"
+ android:longClickable="true" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/content_markdown_view_item_post_detail"
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 0e2a5b66..2b7e673b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -405,4 +405,10 @@
<string name="copy_success">Copied</string>
<string name="copy_failed">Cannot copy the link</string>
+ <string name="copy_text">Copy</string>
+ <string name="copy_all">Copy All</string>
+ <string name="copy_markdown">Copy Markdown</string>
+ <string name="copy_raw_text">Copy Raw Text</string>
+ <string name="copy_all_markdown">Copy All Markdown</string>
+ <string name="copy_all_raw_text">Copy All Raw Text</string>
</resources>
diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml
index 3248cfd4..b91ecdb1 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -58,6 +58,12 @@
<item name="buttonBarNegativeButtonStyle">@style/MaterialAlertDialogNegativeButtonStyle</item>
</style>
+ <style name="CopyTextMaterialAlertDialogTheme">
+ <item name="android:textSize">?attr/font_default</item>
+ <item name="materialAlertDialogTitleTextStyle">@style/MaterialAlertDialogTitleTextStyle</item>
+ <item name="buttonBarNegativeButtonStyle">@style/MaterialAlertDialogNegativeButtonStyle</item>
+ </style>
+
<style name="MaterialAlertDialogPositiveButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/colorAccent</item>
</style>