mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2025-10-05 21:39:50 +02:00
Sharing and copying post links and media links are available.
This commit is contained in:
9
app/src/main/res/drawable-night/ic_copy_24dp.xml
Normal file
9
app/src/main/res/drawable-night/ic_copy_24dp.xml
Normal 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:fillColor="#FFFFFFFF"
|
||||
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable-night/ic_image_24dp.xml
Normal file
9
app/src/main/res/drawable-night/ic_image_24dp.xml
Normal 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:fillColor="#FFFFFFFF"
|
||||
android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable-night/ic_link.xml
Normal file
9
app/src/main/res/drawable-night/ic_link.xml
Normal 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:fillColor="#FFFFFFFF"
|
||||
android:pathData="M17,7h-4v2h4c1.65,0 3,1.35 3,3s-1.35,3 -3,3h-4v2h4c2.76,0 5,-2.24 5,-5s-2.24,-5 -5,-5zM11,15L7,15c-1.65,0 -3,-1.35 -3,-3s1.35,-3 3,-3h4L11,7L7,7c-2.76,0 -5,2.24 -5,5s2.24,5 5,5h4v-2zM8,11h8v2L8,13z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable-night/ic_outline_text_24px.xml
Normal file
9
app/src/main/res/drawable-night/ic_outline_text_24px.xml
Normal 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:fillColor="#FFFFFFFF"
|
||||
android:pathData="M20,2L4,2c-1.1,0 -2,0.9 -2,2v18l4,-4h14c1.1,0 2,-0.9 2,-2L22,4c0,-1.1 -0.9,-2 -2,-2zM20,16L6,16l-2,2L4,4h16v12zM7,9h2v2L7,11zM11,9h2v2h-2zM15,9h2v2h-2z"/>
|
||||
</vector>
|
@@ -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:fillColor="#FFFFFFFF"
|
||||
android:pathData="M21,3L3,3c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h18c1.1,0 2,-0.9 2,-2L23,5c0,-1.1 -0.9,-2 -2,-2zM21,16L3,16L3,5h18v11z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_copy_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_copy_24dp.xml
Normal 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:fillColor="#FF000000"
|
||||
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
|
||||
</vector>
|
9
app/src/main/res/drawable/ic_image_24dp.xml
Normal file
9
app/src/main/res/drawable/ic_image_24dp.xml
Normal 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:fillColor="#FF000000"
|
||||
android:pathData="M21,19V5c0,-1.1 -0.9,-2 -2,-2H5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h14c1.1,0 2,-0.9 2,-2zM8.5,13.5l2.5,3.01L14.5,12l4.5,6H5l3.5,-4.5z"/>
|
||||
</vector>
|
@@ -10,125 +10,77 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/text_type_linear_layout_post_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/bottom_sheet_post_text"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_outline_text_24px"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" >
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:src="@drawable/ic_outline_text_24px"
|
||||
android:tint="@color/primaryTextColor" />
|
||||
|
||||
<TextView
|
||||
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="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/link_type_linear_layout_post_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/bottom_sheet_post_link"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_link"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" >
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:src="@drawable/ic_link"
|
||||
android:tint="@color/primaryTextColor" />
|
||||
|
||||
<TextView
|
||||
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="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/image_type_linear_layout_post_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" >
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:src="@drawable/ic_menu_gallery"
|
||||
android:tint="@color/primaryTextColor" />
|
||||
|
||||
<TextView
|
||||
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="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
<TextView
|
||||
android:id="@+id/video_type_linear_layout_post_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/bottom_sheet_post_link"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_outline_video_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" >
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="18dp"
|
||||
android:layout_height="18dp"
|
||||
android:layout_marginEnd="48dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:src="@drawable/ic_outline_video_label_24px"
|
||||
android:tint="@color/primaryTextColor" />
|
||||
|
||||
<TextView
|
||||
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="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
<TextView
|
||||
android:id="@+id/image_type_linear_layout_post_type_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/bottom_sheet_post_video"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_image_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
87
app/src/main/res/layout/fragment_share_link_bottom_sheet.xml
Normal file
87
app/src/main/res/layout/fragment_share_link_bottom_sheet.xml
Normal file
@@ -0,0 +1,87 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="8dp"
|
||||
android:overScrollMode="never">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_post_link_text_view_share_link_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/share_post_link"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_link"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/copy_post_link_text_view_share_link_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:text="@string/copy_post_link"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_copy_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/share_media_link_text_view_share_link_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_link"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:visibility="gone" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/copy_media_link_text_view_share_link_bottom_sheet_fragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:paddingTop="16dp"
|
||||
android:paddingBottom="16dp"
|
||||
android:paddingStart="32dp"
|
||||
android:paddingEnd="32dp"
|
||||
android:textColor="@color/primaryTextColor"
|
||||
android:textSize="?attr/font_default"
|
||||
android:drawableStart="@drawable/ic_copy_24dp"
|
||||
android:drawablePadding="48dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:visibility="gone" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
@@ -389,4 +389,18 @@
|
||||
<string name="share_this_app">Check out Infinity for Reddit, an awesome Reddit client!\nhttps://play.google.com/store/apps/details?id=ml.docilealligator.infinityforreddit</string>
|
||||
|
||||
<string name="error_getting_subreddit_name">Error getting subreddit name</string>
|
||||
|
||||
<string name="share_post_link">Share Post Link</string>
|
||||
<string name="share_image_link">Share Image Link</string>
|
||||
<string name="share_gif_link">Share Gif Link</string>
|
||||
<string name="share_video_link">Share Video Link</string>
|
||||
<string name="share_link">Share Link</string>
|
||||
<string name="copy_post_link">Copy Post Link</string>
|
||||
<string name="copy_image_link">Copy Image Link</string>
|
||||
<string name="copy_gif_link">Copy Gif Link</string>
|
||||
<string name="copy_video_link">Copy Video Link</string>
|
||||
<string name="copy_link">Copy Link</string>
|
||||
|
||||
<string name="copy_success">Copied</string>
|
||||
<string name="copy_failed">Cannot copy the link</string>
|
||||
</resources>
|
||||
|
Reference in New Issue
Block a user