aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java5
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java15
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java7
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java5
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java37
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java15
-rw-r--r--app/src/main/res/layout/fragment_view_reddit_gallery_image_or_gif.xml20
-rw-r--r--app/src/main/res/layout/item_post_detail_gallery.xml68
9 files changed, 124 insertions, 60 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java
index a8d13ed7..4e303c29 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java
@@ -145,6 +145,11 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa
ButterKnife.bind(this);
+ getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+
if (mSharedPreferences.getBoolean(SharedPreferencesUtils.SWIPE_VERTICALLY_TO_GO_BACK_FROM_MEDIA, true)) {
Slidr.attach(this, new SlidrConfig.Builder().position(SlidrPosition.VERTICAL).distanceThreshold(0.125f).build());
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java
index 20d3440f..43e8cc0d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImgurMediaActivity.java
@@ -6,6 +6,7 @@ import android.graphics.drawable.Drawable;
import android.os.AsyncTask;
import android.os.Bundle;
import android.os.Handler;
+import android.text.Html;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@@ -21,9 +22,6 @@ import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentStatePagerAdapter;
import androidx.viewpager.widget.ViewPager;
-import app.futured.hauler.DragDirection;
-import app.futured.hauler.HaulerView;
-
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
@@ -34,6 +32,8 @@ import java.util.concurrent.Executor;
import javax.inject.Inject;
import javax.inject.Named;
+import app.futured.hauler.DragDirection;
+import app.futured.hauler.HaulerView;
import butterknife.BindView;
import butterknife.ButterKnife;
import ml.docilealligator.infinityforreddit.ImgurMedia;
@@ -118,6 +118,11 @@ public class ViewImgurMediaActivity extends AppCompatActivity implements SetAsWa
ButterKnife.bind(this);
+ getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+
useBottomAppBar = sharedPreferences.getBoolean(SharedPreferencesUtils.USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER, false);
if (!useBottomAppBar) {
@@ -292,9 +297,9 @@ public class ViewImgurMediaActivity extends AppCompatActivity implements SetAsWa
private void setToolbarTitle(int position) {
if (images != null && position >= 0 && position < images.size()) {
if (images.get(position).getType() == ImgurMedia.TYPE_VIDEO) {
- setTitle(getString(R.string.view_imgur_media_activity_video_label, position + 1, images.size()));
+ setTitle(Html.fromHtml("<font color=\"#FFFFFF\">" + getString(R.string.view_imgur_media_activity_video_label, position + 1, images.size()) + "</font>"));
} else {
- setTitle(getString(R.string.view_imgur_media_activity_image_label, position + 1, images.size()));
+ setTitle(Html.fromHtml("<font color=\"#FFFFFF\">" + getString(R.string.view_imgur_media_activity_image_label, position + 1, images.size()) + "</font>"));
}
}
}
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 aadf344d..753c2767 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewRedditGalleryActivity.java
@@ -15,6 +15,7 @@ import android.os.Handler;
import android.text.Html;
import android.view.Menu;
import android.view.MenuItem;
+import android.view.View;
import android.widget.Toast;
import androidx.annotation.NonNull;
@@ -40,7 +41,6 @@ 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;
@@ -132,6 +132,11 @@ public class ViewRedditGalleryActivity extends AppCompatActivity implements SetA
ButterKnife.bind(this);
+ getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+
useBottomAppBar = sharedPreferences.getBoolean(SharedPreferencesUtils.USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER, false);
if (!useBottomAppBar) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
index d70aaa68..8fd09be5 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewVideoActivity.java
@@ -276,6 +276,11 @@ public class ViewVideoActivity extends AppCompatActivity {
Resources resources = getResources();
+ getWindow().getDecorView().setSystemUiVisibility(
+ View.SYSTEM_UI_FLAG_LAYOUT_STABLE
+ | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION
+ | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
+
boolean useBottomAppBar = mSharedPreferences.getBoolean(SharedPreferencesUtils.USE_BOTTOM_TOOLBAR_IN_MEDIA_VIEWER, false);
if (useBottomAppBar) {
getSupportActionBar().hide();
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java
index df3d88ae..2d8526bc 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java
@@ -67,7 +67,6 @@ import ml.docilealligator.infinityforreddit.bottomsheetfragments.SetAsWallpaperB
import ml.docilealligator.infinityforreddit.bottomsheetfragments.UrlMenuBottomSheetFragment;
import ml.docilealligator.infinityforreddit.post.Post;
import ml.docilealligator.infinityforreddit.services.DownloadMediaService;
-import ml.docilealligator.infinityforreddit.utils.Utils;
public class ViewRedditGalleryImageOrGifFragment extends Fragment {
@@ -111,6 +110,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
private boolean isDownloading = false;
private boolean isActionBarHidden = false;
private boolean isUseBottomCaption = false;
+ private boolean isFallback = false;
public ViewRedditGalleryImageOrGifFragment() {
// Required empty public constructor
@@ -177,6 +177,21 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
view.setQuickScaleEnabled(true);
view.resetScaleAndCenter();
}
+
+ @Override
+ public void onImageLoadError(Exception e) {
+ e.printStackTrace();
+ // For issue #558
+ // Make sure it's not stuck in a loop if it comes to that
+ // Fallback url should be empty if it's not an album item
+ if (!isFallback && media.hasFallback()) {
+ imageView.cancel();
+ isFallback = true;
+ loadImage();
+ } else {
+ isFallback = false;
+ }
+ }
});
}
}
@@ -251,8 +266,6 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
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);
@@ -317,7 +330,12 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
}
private void loadImage() {
- imageView.showImage(Uri.parse(media.url));
+ if(isFallback) {
+ imageView.showImage(Uri.parse(media.fallbackUrl));
+ }
+ else{
+ imageView.showImage(Uri.parse(media.url));
+ }
}
@Override
@@ -374,16 +392,18 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
isDownloading = false;
Intent intent = new Intent(activity, DownloadMediaService.class);
- intent.putExtra(DownloadMediaService.EXTRA_URL, media.url);
- intent.putExtra(DownloadMediaService.EXTRA_MEDIA_TYPE, media.mediaType == Post.Gallery.TYPE_GIF ? DownloadMediaService.EXTRA_MEDIA_TYPE_GIF : DownloadMediaService.EXTRA_MEDIA_TYPE_IMAGE);
+ intent.putExtra(DownloadMediaService.EXTRA_URL, media.hasFallback() ? media.fallbackUrl : media.url); // Retrieve original instead of the one additionally compressed by reddit
+ intent.putExtra(DownloadMediaService.EXTRA_MEDIA_TYPE, media.mediaType == Post.Gallery.TYPE_GIF ? DownloadMediaService.EXTRA_MEDIA_TYPE_GIF: DownloadMediaService.EXTRA_MEDIA_TYPE_IMAGE);
intent.putExtra(DownloadMediaService.EXTRA_FILE_NAME, media.fileName);
intent.putExtra(DownloadMediaService.EXTRA_SUBREDDIT_NAME, subredditName);
ContextCompat.startForegroundService(activity, intent);
Toast.makeText(activity, R.string.download_started, Toast.LENGTH_SHORT).show();
}
+ //TODO: Find a way to share original image, Glide messes with the size and quality,
+ // compression should be up to the app being shared with (WhatsApp for example)
private void shareImage() {
- glide.asBitmap().load(media.url).into(new CustomTarget<Bitmap>() {
+ glide.asBitmap().load(media.hasFallback() ? media.fallbackUrl : media.url).into(new CustomTarget<Bitmap>() {
@Override
public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {
if (activity.getExternalCacheDir() != null) {
@@ -499,7 +519,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
super.onResume();
SubsamplingScaleImageView ssiv = imageView.getSSIV();
if (ssiv == null || !ssiv.hasImage()) {
- imageView.showImage(Uri.parse(media.url));
+ loadImage();
}
}
@@ -507,6 +527,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment {
public void onDestroyView() {
super.onDestroyView();
imageView.cancel();
+ isFallback = false;
SubsamplingScaleImageView subsamplingScaleImageView = imageView.getSSIV();
if (subsamplingScaleImageView != null) {
subsamplingScaleImageView.recycle();
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 860feaf2..cf070e4e 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/ParsePost.java
@@ -3,6 +3,7 @@ package ml.docilealligator.infinityforreddit.post;
import android.net.Uri;
import android.os.Handler;
import android.text.Html;
+import android.text.TextUtils;
import org.json.JSONArray;
import org.json.JSONException;
@@ -575,8 +576,17 @@ public class ParsePost {
previews.add(new Post.Preview(galleryItemUrl, singleGalleryObject.getJSONObject(JSONUtils.S_KEY).getInt(JSONUtils.X_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), galleryItemCaption, galleryItemCaptionUrl);
+
+ // For issue #558
+ // Construct a fallback image url
+ if(!TextUtils.isEmpty(galleryItemUrl) && !TextUtils.isEmpty(mimeType) && (mimeType.contains("jpg") || mimeType.contains("png"))) {
+ postGalleryItem.setFallbackUrl("https://i.redd.it/" + galleryId + "." + mimeType.substring(mimeType.lastIndexOf("/") + 1));
+ postGalleryItem.setHasFallback(true);
+ }
- gallery.add(new Post.Gallery(mimeType, galleryItemUrl, subredditName + "-" + galleryId + "." + mimeType.substring(mimeType.lastIndexOf("/") + 1), galleryItemCaption, galleryItemCaptionUrl));
+ gallery.add(postGalleryItem);
}
if (!gallery.isEmpty()) {
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 e19696a3..ce096362 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/post/Post.java
@@ -580,14 +580,17 @@ public class Post implements Parcelable {
public String mimeType;
public String url;
+ public String fallbackUrl;
+ private boolean hasFallback;
public String fileName;
public int mediaType;
public String caption;
public String captionUrl;
- public Gallery(String mimeType, String url, String fileName, String caption, String captionUrl) {
+ public Gallery(String mimeType, String url, String fallbackUrl, String fileName, String caption, String captionUrl) {
this.mimeType = mimeType;
this.url = url;
+ this.fallbackUrl = fallbackUrl;
this.fileName = fileName;
if (mimeType.contains("gif")) {
mediaType = TYPE_GIF;
@@ -603,6 +606,8 @@ public class Post implements Parcelable {
protected Gallery(Parcel in) {
mimeType = in.readString();
url = in.readString();
+ fallbackUrl = in.readString();
+ hasFallback = in.readByte() != 0;
fileName = in.readString();
mediaType = in.readInt();
caption = in.readString();
@@ -630,11 +635,19 @@ public class Post implements Parcelable {
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(mimeType);
parcel.writeString(url);
+ parcel.writeString(fallbackUrl);
+ 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; }
+
+ public void setHasFallback(boolean hasFallback) { this.hasFallback = hasFallback; }
+
+ public boolean hasFallback() { return this.hasFallback; }
}
public static class Preview implements Parcelable {
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 4cfdf858..c0aa4168 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
@@ -51,41 +51,43 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:orientation="vertical">
+ android:orientation="vertical"
+ android:animateLayoutChanges="true">
<LinearLayout
android:id="@+id/caption_layout_view_reddit_gallery_image_or_gif_fragment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:gravity="center_vertical"
android:orientation="vertical"
- android:paddingTop="8dp"
+ android:layout_marginBottom="16dp"
+ android:layout_marginEnd="16dp"
android:visibility="gone">
<TextView
android:id="@+id/caption_text_view_view_reddit_gallery_image_or_gif_fragment"
- android:layout_width="wrap_content"
+ android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
- android:fontFamily="?attr/content_font_family"
android:maxLength="180"
+ android:fontFamily="?attr/content_font_family"
android:textColor="#FFFFFF"
android:textSize="?attr/content_font_default"
android:visibility="gone" />
<TextView
android:id="@+id/caption_url_text_view_view_reddit_gallery_image_or_gif_fragment"
- android:layout_width="wrap_content"
- android:layout_height="0dp"
- android:layout_weight="1"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_marginTop="8dp"
android:ellipsize="end"
- android:fontFamily="?attr/content_font_family"
android:maxLength="180"
+ android:fontFamily="?attr/content_font_family"
android:textColor="#FFFFFF"
android:textColorLink="#FFFFFF"
android:textSize="?attr/content_font_default"
android:textStyle="bold"
android:visibility="gone" />
+
</LinearLayout>
<LinearLayout
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 0cf6a484..2b3ed1ef 100644
--- a/app/src/main/res/layout/item_post_detail_gallery.xml
+++ b/app/src/main/res/layout/item_post_detail_gallery.xml
@@ -27,13 +27,13 @@
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="8dp"
- android:fontFamily="?attr/font_family"
android:textSize="?attr/font_default"
- app:layout_constrainedWidth="true"
+ android:fontFamily="?attr/font_family"
+ app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
app:layout_constraintEnd_toStartOf="@id/guideline"
+ app:layout_constraintTop_toTopOf="parent"
app:layout_constraintHorizontal_bias="0"
- app:layout_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
- app:layout_constraintTop_toTopOf="parent" />
+ app:layout_constrainedWidth="true" />
<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:fontFamily="?attr/font_family"
android:textSize="?attr/font_default"
- app:layout_constrainedWidth="true"
+ android:fontFamily="?attr/font_family"
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_constraintStart_toEndOf="@+id/icon_gif_image_view_item_post_detail_gallery"
- app:layout_constraintTop_toBottomOf="@+id/subreddit_text_view_item_post_detail_gallery" />
+ app:layout_constrainedWidth="true" />
<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:fontFamily="?attr/font_family"
android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family"
android:visibility="gone"
- 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_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"
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"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
+ 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_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:textSize="?attr/title_font_18" />
+ android:enabled="true"
+ android:focusable="true"
+ android:longClickable="true" />
<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:fontFamily="?attr/font_family"
- android:padding="4dp"
android:text="@string/spoiler"
android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family"
+ android:padding="4dp"
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:fontFamily="?attr/font_family"
- android:textSize="?attr/font_12" />
+ android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family" />
<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:fontFamily="?attr/font_family"
android:textSize="?attr/font_12"
+ android:fontFamily="?attr/font_family"
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_gravity="start"
android:layout_margin="16dp"
- android:background="@drawable/play_button_round_background"
+ android:layout_gravity="start"
android:scaleType="center"
+ android:background="@drawable/play_button_round_background"
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:layout_centerInParent="true"
android:drawableTop="@drawable/ic_error_outline_black_24dp"
- android:fontFamily="?attr/font_family"
+ android:layout_centerInParent="true"
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>
@@ -301,10 +301,8 @@
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:paddingHorizontal="8dp"
android:textColor="?attr/primaryTextColor"
android:textSize="?attr/content_font_default"
app:layout_constrainedWidth="true"