mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Copy post title and content in ViewPostDetailActivity.
This commit is contained in:
19
app/src/main/res/layout/copy_text_material_dialog.xml
Normal file
19
app/src/main/res/layout/copy_text_material_dialog.xml
Normal file
@@ -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>
|
77
app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml
Normal file
77
app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml
Normal file
@@ -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>
|
@@ -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"
|
||||
|
@@ -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>
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user