aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java13
-rw-r--r--app/src/main/res/layout/fragment_share_link_bottom_sheet.xml29
2 files changed, 40 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java
index d6385527..1d69854f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/bottomsheetfragments/ShareLinkBottomSheetFragment.java
@@ -32,12 +32,16 @@ public class ShareLinkBottomSheetFragment extends LandscapeExpandedRoundedBottom
public static final String EXTRA_MEDIA_LINK = "EML";
public static final String EXTRA_MEDIA_TYPE = "EMT";
+ @BindView(R.id.post_link_text_view_share_link_bottom_sheet_fragment)
+ TextView postLinkTextView;
@BindView(R.id.share_post_link_text_view_share_link_bottom_sheet_fragment)
TextView sharePostLinkTextView;
- @BindView(R.id.share_media_link_text_view_share_link_bottom_sheet_fragment)
- TextView shareMediaLinkTextView;
@BindView(R.id.copy_post_link_text_view_share_link_bottom_sheet_fragment)
TextView copyPostLinkTextView;
+ @BindView(R.id.media_link_text_view_share_link_bottom_sheet_fragment)
+ TextView mediaLinkTextView;
+ @BindView(R.id.share_media_link_text_view_share_link_bottom_sheet_fragment)
+ TextView shareMediaLinkTextView;
@BindView(R.id.copy_media_link_text_view_share_link_bottom_sheet_fragment)
TextView copyMediaLinkTextView;
@@ -59,10 +63,15 @@ public class ShareLinkBottomSheetFragment extends LandscapeExpandedRoundedBottom
String postLink = getArguments().getString(EXTRA_POST_LINK);
String mediaLink = getArguments().containsKey(EXTRA_MEDIA_LINK) ? getArguments().getString(EXTRA_MEDIA_LINK) : null;
+ postLinkTextView.setText(postLink);
+
if (mediaLink != null) {
+ mediaLinkTextView.setVisibility(View.VISIBLE);
shareMediaLinkTextView.setVisibility(View.VISIBLE);
copyMediaLinkTextView.setVisibility(View.VISIBLE);
+ mediaLinkTextView.setText(mediaLink);
+
int mediaType = getArguments().getInt(EXTRA_MEDIA_TYPE);
switch (mediaType) {
case Post.IMAGE_TYPE:
diff --git a/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml b/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml
index 3f7c0a93..01091b03 100644
--- a/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml
+++ b/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml
@@ -11,6 +11,20 @@
android:orientation="vertical">
<TextView
+ android:id="@+id/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:textColor="?attr/secondaryTextColor"
+ android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family"
+ android:drawablePadding="48dp" />
+
+ <TextView
android:id="@+id/share_post_link_text_view_share_link_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
@@ -49,6 +63,21 @@
android:background="?attr/selectableItemBackground" />
<TextView
+ android:id="@+id/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="?attr/secondaryTextColor"
+ android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family"
+ android:drawablePadding="48dp"
+ android:visibility="gone" />
+
+ <TextView
android:id="@+id/share_media_link_text_view_share_link_bottom_sheet_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"