diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java index 8b477c34..aadf344d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java @@ -1,8 +1,15 @@ package ml.docilealligator.infinityforreddit.activities; +import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY; +import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM; +import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_NO; +import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_YES; + import android.content.SharedPreferences; +import android.content.res.Configuration; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Bundle; import android.os.Handler; import android.text.Html; @@ -13,6 +20,7 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; +import androidx.appcompat.app.AppCompatDelegate; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentStatePagerAdapter; @@ -32,6 +40,7 @@ import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.SetAsWallpaperCallback; import ml.docilealligator.infinityforreddit.WallpaperSetter; +import ml.docilealligator.infinityforreddit.customtheme.CustomThemeWrapper; import ml.docilealligator.infinityforreddit.customviews.ViewPagerBugFixed; import ml.docilealligator.infinityforreddit.font.ContentFontFamily; import ml.docilealligator.infinityforreddit.font.ContentFontStyle; @@ -53,15 +62,15 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA HaulerView haulerView; @BindView(R.id.view_pager_view_reddit_gallery_activity) ViewPagerBugFixed viewPager; - private SectionsPagerAdapter sectionsPagerAdapter; - private ArrayList gallery; - private String subredditName; - private boolean useBottomAppBar; @Inject @Named("default") SharedPreferences sharedPreferences; @Inject Executor executor; + private SectionsPagerAdapter sectionsPagerAdapter; + private ArrayList gallery; + private String subredditName; + private boolean useBottomAppBar; @Override protected void onCreate(Bundle savedInstanceState) { @@ -69,7 +78,37 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA ((Infinity) getApplication()).getAppComponent().inject(this); - getTheme().applyStyle(R.style.Theme_Normal, true); + boolean systemDefault = Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q; + int systemThemeType = Integer.parseInt(sharedPreferences.getString(SharedPreferencesUtils.THEME_KEY, "2")); + switch (systemThemeType) { + case 0: + AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO); + getTheme().applyStyle(R.style.Theme_Normal, true); + break; + case 1: + AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_YES); + if (sharedPreferences.getBoolean(SharedPreferencesUtils.AMOLED_DARK_KEY, false)) { + getTheme().applyStyle(R.style.Theme_Normal_AmoledDark, true); + } else { + getTheme().applyStyle(R.style.Theme_Normal_NormalDark, true); + } + break; + case 2: + if (systemDefault) { + AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_FOLLOW_SYSTEM); + } else { + AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_AUTO_BATTERY); + } + if ((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_NO) { + getTheme().applyStyle(R.style.Theme_Normal, true); + } else { + if (sharedPreferences.getBoolean(SharedPreferencesUtils.AMOLED_DARK_KEY, false)) { + getTheme().applyStyle(R.style.Theme_Normal_AmoledDark, true); + } else { + getTheme().applyStyle(R.style.Theme_Normal_NormalDark, true); + } + } + } getTheme().applyStyle(FontStyle.valueOf(sharedPreferences .getString(SharedPreferencesUtils.FONT_SIZE_KEY, FontStyle.Normal.name())).getResId(), true); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java index 6aa50c65..97ea961d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -131,7 +131,6 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter previews) { Post.Preview preview; @@ -1485,6 +1511,7 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter hideAppBar()); + errorLinearLayout.setOnClickListener(view -> { progressBar.setVisibility(View.VISIBLE); errorLinearLayout.setVisibility(View.GONE); @@ -250,9 +257,81 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { }); } + String caption = media.caption; + String captionUrl = media.captionUrl; + boolean captionIsEmpty = TextUtils.isEmpty(caption); + boolean captionUrlIsEmpty = TextUtils.isEmpty(captionUrl); + if (!captionIsEmpty || !captionUrlIsEmpty) { + isUseBottomCaption = true; + + if (!activity.isUseBottomAppBar()) { + bottomAppBar.setVisibility(View.VISIBLE); + bottomAppBarMenu.setVisibility(View.GONE); + + captionLayout.setPadding(0, captionLayout.getPaddingTop(), 0, (int) Utils.convertDpToPixel(16, activity)); + } + + captionLayout.setVisibility(View.VISIBLE); + + if (!captionIsEmpty) { + captionTextView.setVisibility(View.VISIBLE); + captionTextView.setText(caption); + captionTextView.setOnClickListener(view -> hideAppBar()); + captionTextView.setOnLongClickListener(view -> { + if (activity != null + && !activity.isDestroyed() + && !activity.isFinishing() + && captionTextView.getSelectionStart() == -1 + && captionTextView.getSelectionEnd() == -1) { + Bundle bundle = new Bundle(); + bundle.putString(CopyTextBottomSheetFragment.EXTRA_RAW_TEXT, caption); + CopyTextBottomSheetFragment copyTextBottomSheetFragment = new CopyTextBottomSheetFragment(); + copyTextBottomSheetFragment.setArguments(bundle); + copyTextBottomSheetFragment.show(activity.getSupportFragmentManager(), copyTextBottomSheetFragment.getTag()); + } + return true; + }); + } + if (!captionUrlIsEmpty) { + 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, captionUrl); + urlMenuBottomSheetFragment.setArguments(bundle); + urlMenuBottomSheetFragment.show(activity.getSupportFragmentManager(), urlMenuBottomSheetFragment.getTag()); + } + return true; + }); + captionUrlTextView.setVisibility(View.VISIBLE); + } + } + 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() { if(isFallback) { imageView.showImage(Uri.parse(media.fallbackUrl)); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java index 8ae15029..e49ffa7e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/FetchRemovedPost.java @@ -98,7 +98,7 @@ public class FetchRemovedPost { previews.set(0, preview); } } else { - Post.Preview preview = new Post.Preview(result.getString("thumbnail"), 1, 1); + Post.Preview preview = new Post.Preview(result.getString("thumbnail"), 1, 1, "", ""); preview.setPreviewUrl(result.getString("thumbnail")); ArrayList newPreviews = new ArrayList<>(); newPreviews.add(preview); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java index 034f73fd..cf070e4e 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java @@ -210,7 +210,7 @@ public class ParsePost { String previewUrl = images.getJSONObject(JSONUtils.SOURCE_KEY).getString(JSONUtils.URL_KEY); int previewWidth = images.getJSONObject(JSONUtils.SOURCE_KEY).getInt(JSONUtils.WIDTH_KEY); int previewHeight = images.getJSONObject(JSONUtils.SOURCE_KEY).getInt(JSONUtils.HEIGHT_KEY); - previews.add(new Post.Preview(previewUrl, previewWidth, previewHeight)); + previews.add(new Post.Preview(previewUrl, previewWidth, previewHeight, "", "")); JSONArray thumbnailPreviews = images.getJSONArray(JSONUtils.RESOLUTIONS_KEY); for (int i = 0; i < thumbnailPreviews.length(); i++) { @@ -219,7 +219,7 @@ public class ParsePost { int thumbnailPreviewWidth = thumbnailPreview.getInt(JSONUtils.WIDTH_KEY); int thumbnailPreviewHeight = thumbnailPreview.getInt(JSONUtils.HEIGHT_KEY); - previews.add(new Post.Preview(thumbnailPreviewUrl, thumbnailPreviewWidth, thumbnailPreviewHeight)); + previews.add(new Post.Preview(thumbnailPreviewUrl, thumbnailPreviewWidth, thumbnailPreviewHeight, "", "")); } } if (data.has(JSONUtils.CROSSPOST_PARENT_LIST)) { @@ -302,7 +302,7 @@ public class ParsePost { spoiler, nsfw, stickied, archived, locked, saved, isCrosspost); if (previews.isEmpty()) { - previews.add(new Post.Preview(url, 0, 0)); + previews.add(new Post.Preview(url, 0, 0, "", "")); } post.setPreviews(previews); } else { @@ -342,7 +342,7 @@ public class ParsePost { String previewUrl = images.getJSONObject(JSONUtils.SOURCE_KEY).getString(JSONUtils.URL_KEY); int previewWidth = images.getJSONObject(JSONUtils.SOURCE_KEY).getInt(JSONUtils.WIDTH_KEY); int previewHeight = images.getJSONObject(JSONUtils.SOURCE_KEY).getInt(JSONUtils.HEIGHT_KEY); - previews.add(new Post.Preview(previewUrl, previewWidth, previewHeight)); + previews.add(new Post.Preview(previewUrl, previewWidth, previewHeight, "", "")); JSONArray thumbnailPreviews = images.getJSONArray(JSONUtils.RESOLUTIONS_KEY); for (int i = 0; i < thumbnailPreviews.length(); i++) { @@ -351,7 +351,7 @@ public class ParsePost { int thumbnailPreviewWidth = thumbnailPreview.getInt(JSONUtils.WIDTH_KEY); int thumbnailPreviewHeight = thumbnailPreview.getInt(JSONUtils.HEIGHT_KEY); - previews.add(new Post.Preview(thumbnailPreviewUrl, thumbnailPreviewWidth, thumbnailPreviewHeight)); + previews.add(new Post.Preview(thumbnailPreviewUrl, thumbnailPreviewWidth, thumbnailPreviewHeight, "", "")); } } } @@ -398,7 +398,7 @@ public class ParsePost { hidden, spoiler, nsfw, stickied, archived, locked, saved, isCrosspost); if (previews.isEmpty()) { - previews.add(new Post.Preview(url, 0, 0)); + previews.add(new Post.Preview(url, 0, 0, "", "")); } post.setPreviews(previews); } else if (url.endsWith("gif")){ @@ -491,7 +491,7 @@ public class ParsePost { spoiler, nsfw, stickied, archived, locked, saved, isCrosspost); if (previews.isEmpty()) { - previews.add(new Post.Preview(url, 0, 0)); + previews.add(new Post.Preview(url, 0, 0, "", "")); } post.setPreviews(previews); } else if (url.endsWith("mp4")) { @@ -560,12 +560,24 @@ public class ParsePost { galleryItemUrl = sourceObject.getString(JSONUtils.MP4_KEY); } } + + JSONObject galleryItem = galleryIdsArray.getJSONObject(i); + String galleryItemCaption = ""; + String galleryItemCaptionUrl = ""; + if(galleryItem.has(JSONUtils.CAPTION_KEY)){ + galleryItemCaption = galleryItem.getString(JSONUtils.CAPTION_KEY).trim(); + } + + if(galleryItem.has(JSONUtils.CAPTION_URL_KEY)){ + galleryItemCaptionUrl = galleryItem.getString(JSONUtils.CAPTION_URL_KEY).trim(); + } + if ((previews.isEmpty()) && mimeType.contains("jpg") || mimeType.contains("png")) { previews.add(new Post.Preview(galleryItemUrl, singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.X_KEY), - singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.Y_KEY))); + singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.Y_KEY), galleryItemCaption, galleryItemCaptionUrl)); } - Post.Gallery postGalleryItem = new Post.Gallery(mimeType, galleryItemUrl, "", subredditName + "-" + galleryId + "." + mimeType.substring(mimeType.lastIndexOf("/") + 1)); + Post.Gallery postGalleryItem = new Post.Gallery(mimeType, galleryItemUrl, "", subredditName + "-" + galleryId + "." + mimeType.substring(mimeType.lastIndexOf("/") + 1), galleryItemCaption, galleryItemCaptionUrl); // For issue #558 // Construct a fallback image url diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java b/app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java index 76976da5..ce096362 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java @@ -584,8 +584,10 @@ public class Post implements Parcelable { private boolean hasFallback; public String fileName; public int mediaType; + public String caption; + public String captionUrl; - public Gallery(String mimeType, String url, String fallbackUrl, String fileName) { + public Gallery(String mimeType, String url, String fallbackUrl, String fileName, String caption, String captionUrl) { this.mimeType = mimeType; this.url = url; this.fallbackUrl = fallbackUrl; @@ -597,6 +599,8 @@ public class Post implements Parcelable { } else { mediaType = TYPE_VIDEO; } + this.caption = caption; + this.captionUrl = captionUrl; } protected Gallery(Parcel in) { @@ -606,6 +610,8 @@ public class Post implements Parcelable { hasFallback = in.readByte() != 0; fileName = in.readString(); mediaType = in.readInt(); + caption = in.readString(); + captionUrl = in.readString(); } public static final Creator CREATOR = new Creator() { @@ -633,6 +639,8 @@ public class Post implements Parcelable { parcel.writeByte((byte) (hasFallback ? 1 : 0)); parcel.writeString(fileName); parcel.writeInt(mediaType); + parcel.writeString(caption); + parcel.writeString(captionUrl); } public void setFallbackUrl(String fallbackUrl) { this.fallbackUrl = fallbackUrl; } @@ -646,17 +654,23 @@ public class Post implements Parcelable { private String previewUrl; private int previewWidth; private int previewHeight; + private String previewCaption; + private String previewCaptionUrl; - public Preview(String previewUrl, int previewWidth, int previewHeight) { + public Preview(String previewUrl, int previewWidth, int previewHeight, String previewCaption, String previewCaptionUrl) { this.previewUrl = previewUrl; this.previewWidth = previewWidth; this.previewHeight = previewHeight; + this.previewCaption = previewCaption; + this.previewCaptionUrl = previewCaptionUrl; } protected Preview(Parcel in) { previewUrl = in.readString(); previewWidth = in.readInt(); previewHeight = in.readInt(); + previewCaption = in.readString(); + previewCaptionUrl = in.readString(); } public static final Creator CREATOR = new Creator() { @@ -695,6 +709,18 @@ public class Post implements Parcelable { this.previewHeight = previewHeight; } + public String getPreviewCaption() { + return previewCaption; + } + + public void setPreviewCaption(String previewCaption) { this.previewCaption = previewCaption; } + + public String getPreviewCaptionUrl() { + return previewCaptionUrl; + } + + public void setPreviewCaptionUrl(String previewCaptionUrl) { this.previewCaptionUrl = previewCaptionUrl; } + @Override public int describeContents() { return 0; @@ -705,6 +731,8 @@ public class Post implements Parcelable { parcel.writeString(previewUrl); parcel.writeInt(previewWidth); parcel.writeInt(previewHeight); + parcel.writeString(previewCaption); + parcel.writeString(previewCaptionUrl); } } } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java index b76f198e..19ea43cb 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/JSONUtils.java @@ -171,4 +171,6 @@ public class JSONUtils { public static final String DISPLAY_STRING_KEY = "display_string"; public static final String RESULTS_KEY = "results"; public static final String CONTENT_MD_KEY = "content_md"; + public static final String CAPTION_KEY = "caption"; + public static final String CAPTION_URL_KEY = "outbound_url"; } diff --git a/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml b/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml index b41c5600..4cfdf858 100644 --- a/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml +++ b/app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml @@ -1,7 +1,7 @@ + android:textColor="@android:color/white" + android:textSize="?attr/font_default" /> + android:visibility="gone"> + android:layout_height="wrap_content" + android:orientation="vertical"> - + android:visibility="gone"> - + - + + - + android:layout_height="wrap_content"> + + + + + + + + + diff --git a/app/src/main/res/layout/item_post_detail_gallery.xml b/app/src/main/res/layout/item_post_detail_gallery.xml index 6a5d2a51..0cf6a484 100644 --- a/app/src/main/res/layout/item_post_detail_gallery.xml +++ b/app/src/main/res/layout/item_post_detail_gallery.xml @@ -1,11 +1,11 @@ + android:background="?attr/cardViewBackgroundColor" + android:orientation="vertical"> + app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery" + app:layout_constraintTop_toTopOf="parent" /> + 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" /> + android:textSize="?attr/title_font_18" /> @@ -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" /> @@ -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" /> @@ -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" /> @@ -268,89 +268,145 @@ android:visibility="gone" /> + android:background="?attr/colorBackgroundFloating" + android:visibility="gone"> + + + + + + + + + + + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/plus_button_item_post_detail_gallery" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/score_text_view_item_post_detail_gallery" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintStart_toEndOf="@id/minus_button_item_post_detail_gallery" + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintTop_toTopOf="parent" /> + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" />