aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml/docilealligator
diff options
context:
space:
mode:
authorAlex Ning <chineseperson5@gmail.com>2021-02-16 10:31:42 +0000
committerAlex Ning <chineseperson5@gmail.com>2021-02-16 10:31:42 +0000
commit9efeeb88ac1fde770ccd7506f7c6667c0d333f1e (patch)
tree35aa7664f9a6b13d567ba40c4bdb854f993a8ed5 /app/src/main/java/ml/docilealligator
parent538827f11e2dd20dd8076544f8fbb3b85eb83df8 (diff)
downloadinfinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.tar
infinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.tar.gz
infinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.tar.bz2
infinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.tar.lz
infinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.tar.xz
infinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.tar.zst
infinity-for-reddit-9efeeb88ac1fde770ccd7506f7c6667c0d333f1e.zip
Continue adding Gallery Layout.
Diffstat (limited to 'app/src/main/java/ml/docilealligator')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java6
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java4
2 files changed, 8 insertions, 2 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
index 47db2b6d..b4230074 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -1095,6 +1095,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostGalleryViewHolder) holder).imageView.setVisibility(View.VISIBLE);
((PostGalleryViewHolder) holder).progressBar.setVisibility(View.VISIBLE);
((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setVisibility(View.VISIBLE);
+ ((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setImageDrawable(mActivity.getDrawable(R.drawable.ic_play_circle_36dp));
Post.Preview preview = getSuitablePreview(post.getPreviews());
if (preview != null) {
@@ -1119,6 +1120,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostGalleryViewHolder) holder).imageView.setVisibility(View.VISIBLE);
((PostGalleryViewHolder) holder).progressBar.setVisibility(View.VISIBLE);
((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setVisibility(View.VISIBLE);
+ ((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setImageDrawable(mActivity.getDrawable(R.drawable.ic_play_circle_36dp));
Post.Preview preview = getSuitablePreview(post.getPreviews());
if (preview != null) {
@@ -1142,6 +1144,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
case Post.LINK_TYPE: {
((PostGalleryViewHolder) holder).imageView.setVisibility(View.VISIBLE);
((PostGalleryViewHolder) holder).progressBar.setVisibility(View.VISIBLE);
+ ((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setVisibility(View.VISIBLE);
+ ((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setImageDrawable(mActivity.getDrawable(R.drawable.ic_link));
Post.Preview preview = getSuitablePreview(post.getPreviews());
if (preview != null) {
@@ -1175,6 +1179,8 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
case Post.GALLERY_TYPE: {
((PostGalleryViewHolder) holder).imageView.setVisibility(View.VISIBLE);
((PostGalleryViewHolder) holder).progressBar.setVisibility(View.VISIBLE);
+ ((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setVisibility(View.VISIBLE);
+ ((PostGalleryViewHolder) holder).videoOrGifIndicatorImageView.setImageDrawable(mActivity.getDrawable(R.drawable.ic_gallery_24dp));
Post.Preview preview = getSuitablePreview(post.getPreviews());
if (preview != null) {
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
index c2be273a..b514b160 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/PostFragment.java
@@ -1711,9 +1711,9 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
int halfOffset = mItemOffset / 2;
if (spanIndex == 0) {
- outRect.set(halfOffset, 0, halfOffset, 0);
+ outRect.set(halfOffset, 0, halfOffset / 2, 0);
} else {
- outRect.set(halfOffset, 0, halfOffset, 0);
+ outRect.set(halfOffset / 2, 0, halfOffset, 0);
}
}
}