mirror of
https://codeberg.org/Bazsalanszky/Infinity-For-Lemmy.git
synced 2024-12-28 11:58:23 +01:00
Adjust caption layout
Set caption max length Set link ellipsis
This commit is contained in:
parent
fa772c1d20
commit
1eb1562dfd
@ -768,26 +768,9 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
((PostDetailGalleryViewHolder) holder).mImageView
|
||||
.setRatio((float) preview.getPreviewHeight() / preview.getPreviewWidth());
|
||||
|
||||
String previewCaption = preview.getPreviewCaption();
|
||||
String previewCaptionUrl = preview.getPreviewCaptionUrl();
|
||||
boolean previewCaptionIsEmpty = android.text.TextUtils.isEmpty(previewCaption);
|
||||
boolean previewCaptionUrlIsEmpty = android.text.TextUtils.isEmpty(previewCaptionUrl);
|
||||
if (!previewCaptionIsEmpty || !previewCaptionUrlIsEmpty) {
|
||||
((PostDetailGalleryViewHolder) holder).mCaptionConstraintLayout.setBackgroundColor(mCardViewColor & 0x0D000000); // Make 10% darker than CardViewColor
|
||||
((PostDetailGalleryViewHolder) holder).mCaptionConstraintLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!previewCaptionIsEmpty) {
|
||||
((PostDetailGalleryViewHolder) holder).mCaption.setTextColor(mCommentColor);
|
||||
((PostDetailGalleryViewHolder) holder).mCaption.setText(previewCaption);
|
||||
((PostDetailGalleryViewHolder) holder).mCaption.setSelected(true);
|
||||
}
|
||||
if (!previewCaptionUrlIsEmpty) {
|
||||
String domain = Uri.parse(previewCaptionUrl).getHost();
|
||||
domain = domain.startsWith("www.") ? domain.substring(4) : domain;
|
||||
mPostDetailMarkwon.setMarkdown(((PostDetailGalleryViewHolder) holder).mCaptionUrl, String.format("[%s](%s)", domain, previewCaptionUrl));
|
||||
}
|
||||
|
||||
loadImage((PostDetailGalleryViewHolder) holder, preview);
|
||||
|
||||
loadCaptionPreview((PostDetailGalleryViewHolder) holder, preview);
|
||||
} else {
|
||||
((PostDetailGalleryViewHolder) holder).mNoPreviewPostTypeImageView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -814,6 +797,29 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler
|
||||
}
|
||||
}
|
||||
|
||||
private void loadCaptionPreview(PostDetailBaseViewHolder holder, Post.Preview preview) {
|
||||
if (holder instanceof PostDetailGalleryViewHolder) {
|
||||
String previewCaption = preview.getPreviewCaption();
|
||||
String previewCaptionUrl = preview.getPreviewCaptionUrl();
|
||||
boolean previewCaptionIsEmpty = android.text.TextUtils.isEmpty(previewCaption);
|
||||
boolean previewCaptionUrlIsEmpty = android.text.TextUtils.isEmpty(previewCaptionUrl);
|
||||
if (!previewCaptionIsEmpty || !previewCaptionUrlIsEmpty) {
|
||||
((PostDetailGalleryViewHolder) holder).mCaptionConstraintLayout.setBackgroundColor(mCardViewColor & 0x0D000000); // Make 10% darker than CardViewColor
|
||||
((PostDetailGalleryViewHolder) holder).mCaptionConstraintLayout.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (!previewCaptionIsEmpty) {
|
||||
((PostDetailGalleryViewHolder) holder).mCaption.setTextColor(mCommentColor);
|
||||
((PostDetailGalleryViewHolder) holder).mCaption.setText(previewCaption);
|
||||
((PostDetailGalleryViewHolder) holder).mCaption.setSelected(true);
|
||||
}
|
||||
if (!previewCaptionUrlIsEmpty) {
|
||||
String domain = Uri.parse(previewCaptionUrl).getHost();
|
||||
domain = domain.startsWith("www.") ? domain.substring(4) : domain;
|
||||
mPostDetailMarkwon.setMarkdown(((PostDetailGalleryViewHolder) holder).mCaptionUrl, String.format("[%s](%s)", domain, previewCaptionUrl));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private Post.Preview getSuitablePreview(ArrayList<Post.Preview> previews) {
|
||||
Post.Preview preview;
|
||||
|
@ -201,20 +201,12 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
bottomAppBar.setVisibility(View.VISIBLE);
|
||||
}
|
||||
} else {
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE);
|
||||
isActionBarHidden = true;
|
||||
if (activity.isUseBottomAppBar() || isUseBottomCaption) {
|
||||
bottomAppBar.setVisibility(View.GONE);
|
||||
}
|
||||
hideAppBar();
|
||||
}
|
||||
});
|
||||
|
||||
captionLayout.setOnClickListener(view -> hideAppBar());
|
||||
|
||||
errorLinearLayout.setOnClickListener(view -> {
|
||||
progressBar.setVisibility(View.VISIBLE);
|
||||
errorLinearLayout.setVisibility(View.GONE);
|
||||
@ -268,6 +260,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
if (!captionIsEmpty) {
|
||||
captionTextView.setVisibility(View.VISIBLE);
|
||||
captionTextView.setText(caption);
|
||||
captionTextView.setOnClickListener(view -> hideAppBar());
|
||||
captionTextView.setOnLongClickListener(view -> {
|
||||
if (activity != null
|
||||
&& !activity.isDestroyed()
|
||||
@ -284,12 +277,19 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
});
|
||||
}
|
||||
if (!captionUrlIsEmpty) {
|
||||
captionUrlTextView.setText(captionUrl);
|
||||
String scheme = Uri.parse(captionUrl).getScheme();
|
||||
String urlWithoutScheme = "";
|
||||
if(!TextUtils.isEmpty(scheme)){
|
||||
urlWithoutScheme = captionUrl.substring(scheme.length() + 3);
|
||||
}
|
||||
|
||||
captionUrlTextView.setText(TextUtils.isEmpty(urlWithoutScheme) ? captionUrl : urlWithoutScheme);
|
||||
|
||||
BetterLinkMovementMethod.linkify(Linkify.WEB_URLS, captionUrlTextView).setOnLinkLongClickListener((textView, url) -> {
|
||||
if (activity != null && !activity.isDestroyed() && !activity.isFinishing()) {
|
||||
UrlMenuBottomSheetFragment urlMenuBottomSheetFragment = new UrlMenuBottomSheetFragment();
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putString(UrlMenuBottomSheetFragment.EXTRA_URL, url);
|
||||
bundle.putString(UrlMenuBottomSheetFragment.EXTRA_URL, captionUrl);
|
||||
urlMenuBottomSheetFragment.setArguments(bundle);
|
||||
urlMenuBottomSheetFragment.show(activity.getSupportFragmentManager(), urlMenuBottomSheetFragment.getTag());
|
||||
}
|
||||
@ -302,6 +302,20 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
|
||||
return rootView;
|
||||
}
|
||||
|
||||
private void hideAppBar() {
|
||||
activity.getWindow().getDecorView().setSystemUiVisibility(
|
||||
View.SYSTEM_UI_FLAG_LAYOUT_STABLE
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
|
||||
| View.SYSTEM_UI_FLAG_FULLSCREEN
|
||||
| View.SYSTEM_UI_FLAG_IMMERSIVE);
|
||||
isActionBarHidden = true;
|
||||
if (activity.isUseBottomAppBar() || isUseBottomCaption) {
|
||||
bottomAppBar.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
private void loadImage() {
|
||||
imageView.showImage(Uri.parse(media.url));
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/constraintLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@ -29,24 +29,24 @@
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_error_outline_white_24dp"
|
||||
android:layout_gravity="center"
|
||||
android:drawableTop="@drawable/ic_error_outline_white_24dp"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:gravity="center"
|
||||
android:textColor="@android:color/white"
|
||||
android:text="@string/error_loading_image_tap_to_retry"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="?attr/font_default" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.bottomappbar.BottomAppBar
|
||||
android:id="@+id/bottom_navigation_view_reddit_gallery_image_or_gif_fragment"
|
||||
style="@style/Widget.MaterialComponents.BottomAppBar"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="bottom"
|
||||
android:backgroundTint="#80000000"
|
||||
android:visibility="gone"
|
||||
style="@style/Widget.MaterialComponents.BottomAppBar">
|
||||
android:visibility="gone">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -55,20 +55,20 @@
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/caption_layout_view_reddit_gallery_image_or_gif_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="vertical"
|
||||
android:visibility="gone"
|
||||
android:paddingTop="8dp">
|
||||
android:paddingTop="8dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/caption_text_view_view_reddit_gallery_image_or_gif_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/content_font_family"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLength="180"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="?attr/content_font_default"
|
||||
android:visibility="gone" />
|
||||
@ -80,7 +80,7 @@
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/content_font_family"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLength="180"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textColorLink="#FFFFFF"
|
||||
android:textSize="?attr/content_font_default"
|
||||
@ -97,41 +97,41 @@
|
||||
android:id="@+id/title_text_view_view_reddit_gallery_image_or_gif_fragment"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_weight="1"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="1"
|
||||
android:paddingTop="8dp"
|
||||
android:paddingBottom="8dp"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="?attr/font_20"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end" />
|
||||
android:textSize="?attr/font_20" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/download_image_view_view_reddit_gallery_image_or_gif_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_file_download_toolbar_white_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
android:src="@drawable/ic_file_download_toolbar_white_24dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/share_image_view_view_reddit_gallery_image_or_gif_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_share_toolbar_white_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
android:src="@drawable/ic_share_toolbar_white_24dp" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/wallpaper_image_view_view_reddit_gallery_image_or_gif_fragment"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless"
|
||||
android:padding="16dp"
|
||||
android:src="@drawable/ic_wallpaper_white_24dp"
|
||||
android:background="?attr/selectableItemBackgroundBorderless" />
|
||||
android:src="@drawable/ic_wallpaper_white_24dp" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -1,11 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:orientation="vertical"
|
||||
android:background="?attr/cardViewBackgroundColor">
|
||||
android:background="?attr/cardViewBackgroundColor"
|
||||
android:orientation="vertical">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraint_layout_item_post_detail_gallery"
|
||||
@ -27,13 +27,13 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true" />
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/user_text_view_item_post_detail_gallery"
|
||||
@ -41,14 +41,14 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/author_flair_text_view_item_post_detail_gallery"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_gallery"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true" />
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
|
||||
app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_gallery" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/author_flair_text_view_item_post_detail_gallery"
|
||||
@ -56,28 +56,28 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_gallery"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline"
|
||||
app:layout_constraintHorizontal_bias="0"
|
||||
app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
|
||||
app:layout_constraintTop_toBottomOf="@+id/user_text_view_item_post_detail_gallery"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/post_time_text_view_item_post_detail_gallery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:gravity="end"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
@ -93,15 +93,15 @@
|
||||
android:id="@+id/title_text_view_item_post_detail_gallery"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:enabled="true"
|
||||
android:focusable="true"
|
||||
android:fontFamily="?attr/title_font_family"
|
||||
android:longClickable="true"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/title_font_18"
|
||||
android:fontFamily="?attr/title_font_family"
|
||||
android:textIsSelectable="true"
|
||||
android:enabled="true"
|
||||
android:focusable="true"
|
||||
android:longClickable="true" />
|
||||
android:textSize="?attr/title_font_18" />
|
||||
|
||||
<com.nex3z.flowlayout.FlowLayout
|
||||
android:layout_width="match_parent"
|
||||
@ -116,10 +116,10 @@
|
||||
android:id="@+id/type_text_view_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:text="@string/gallery"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
app:lib_setShape="rectangle" />
|
||||
@ -129,10 +129,10 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:text="@string/spoiler"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:text="@string/spoiler"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
@ -142,10 +142,10 @@
|
||||
android:id="@+id/nsfw_text_view_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:text="@string/nsfw"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
@ -156,9 +156,9 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:padding="4dp"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:visibility="gone"
|
||||
app:lib_setRadius="6dp"
|
||||
app:lib_setRoundedView="true"
|
||||
@ -168,8 +168,8 @@
|
||||
android:id="@+id/upvote_ratio_text_view_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family" />
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_12" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/archived_image_view_item_post_detail_gallery"
|
||||
@ -196,8 +196,8 @@
|
||||
android:id="@+id/awards_text_view_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="?attr/font_12"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:textSize="?attr/font_12"
|
||||
android:visibility="gone" />
|
||||
|
||||
</com.nex3z.flowlayout.FlowLayout>
|
||||
@ -223,10 +223,10 @@
|
||||
android:id="@+id/video_or_gif_indicator_image_view_item_post_detail"
|
||||
android:layout_width="36dp"
|
||||
android:layout_height="36dp"
|
||||
android:layout_margin="16dp"
|
||||
android:layout_gravity="start"
|
||||
android:scaleType="center"
|
||||
android:layout_margin="16dp"
|
||||
android:background="@drawable/play_button_round_background"
|
||||
android:scaleType="center"
|
||||
android:src="@drawable/ic_gallery_24dp" />
|
||||
|
||||
</FrameLayout>
|
||||
@ -247,12 +247,12 @@
|
||||
android:id="@+id/load_image_error_text_view_item_post_detail_gallery"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:drawableTop="@drawable/ic_error_outline_black_24dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:drawableTop="@drawable/ic_error_outline_black_24dp"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:gravity="center"
|
||||
android:text="@string/error_loading_image_tap_to_retry"
|
||||
android:textSize="?attr/font_default"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:visibility="gone" />
|
||||
|
||||
</RelativeLayout>
|
||||
@ -279,42 +279,44 @@
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="marquee"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:fontFamily="?attr/content_font_family"
|
||||
android:gravity="start"
|
||||
android:marqueeRepeatLimit="marquee_forever"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingRight="8dp"
|
||||
android:singleLine="true"
|
||||
android:paddingHorizontal="8dp"
|
||||
android:scrollHorizontally="true"
|
||||
android:focusable="true"
|
||||
android:focusableInTouchMode="true"
|
||||
android:singleLine="true"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/content_font_default"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/guideline4"
|
||||
app:layout_constraintEnd_toStartOf="@id/caption_url_text_view_item_post_detail_gallery"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/caption_url_text_view_item_post_detail_gallery"
|
||||
android:layout_width="0dp"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:ellipsize="end"
|
||||
android:fontFamily="?attr/content_font_family"
|
||||
android:gravity="end"
|
||||
android:isScrollContainer="false"
|
||||
android:maxLines="1"
|
||||
android:paddingEnd="8dp"
|
||||
android:scrollHorizontally="false"
|
||||
android:textColor="?attr/primaryTextColor"
|
||||
android:textSize="?attr/content_font_default"
|
||||
app:layout_constrainedWidth="true"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/guideline4"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintLeft_toRightOf="@id/guideline4"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="1dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.50" />
|
||||
@ -322,89 +324,89 @@
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/bottom_constraint_layout_item_post_detail_gallery"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:id="@+id/bottom_constraint_layout_item_post_detail_gallery">
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/plus_button_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_arrow_upward_grey_24dp"
|
||||
android:background="?actionBarItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_arrow_upward_grey_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/score_text_view_item_post_detail_gallery"
|
||||
android:layout_width="64dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:gravity="center"
|
||||
android:textSize="?attr/font_12"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="?attr/font_family"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_gallery" />
|
||||
app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_gallery"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/minus_button_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_arrow_downward_grey_24dp"
|
||||
android:background="?actionBarItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_arrow_downward_grey_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_gallery" />
|
||||
app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_gallery"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/comments_count_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:gravity="center_vertical"
|
||||
android:textSize="?attr/font_12"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:drawableStart="@drawable/ic_comment_grey_24dp"
|
||||
android:drawablePadding="12dp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:fontFamily="?attr/font_family"
|
||||
android:gravity="center_vertical"
|
||||
android:padding="12dp"
|
||||
android:textSize="?attr/font_12"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_gallery" />
|
||||
app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_gallery"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/save_button_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:background="?actionBarItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:padding="12dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_gallery"
|
||||
app:layout_constraintHorizontal_bias="1"
|
||||
app:layout_constraintStart_toEndOf="@id/comments_count_item_post_detail_gallery"
|
||||
app:layout_constraintEnd_toStartOf="@id/share_button_item_post_detail_gallery" />
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/share_button_item_post_detail_gallery"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_share_grey_24dp"
|
||||
android:background="?actionBarItemBackground"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
android:padding="12dp"
|
||||
android:src="@drawable/ic_share_grey_24dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user