diff options
Diffstat (limited to 'app/src/main/java')
2 files changed, 22 insertions, 0 deletions
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 93386ec5..064ede1d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostDetailRecyclerViewAdapter.java @@ -186,6 +186,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler private int mArchivedTintColor; private int mLockedTintColor; private int mCrosspostTintColor; + private int mMediaIndicatorIconTint; + private int mMediaIndicatorBackgroundColor; private int mUpvoteRatioTintColor; private int mNoPreviewPostTypeBackgroundColor; private int mNoPreviewPostTypeIconTint; @@ -402,6 +404,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler mArchivedTintColor = customThemeWrapper.getArchivedIconTint(); mLockedTintColor = customThemeWrapper.getLockedIconTint(); mCrosspostTintColor = customThemeWrapper.getCrosspostIconTint(); + mMediaIndicatorIconTint = customThemeWrapper.getMediaIndicatorIconColor(); + mMediaIndicatorBackgroundColor = customThemeWrapper.getMediaIndicatorBackgroundColor(); mUpvoteRatioTintColor = customThemeWrapper.getUpvoteRatioIconTint(); mNoPreviewPostTypeBackgroundColor = customThemeWrapper.getNoPreviewPostTypeBackgroundColor(); mNoPreviewPostTypeIconTint = customThemeWrapper.getNoPreviewPostTypeIconTint(); @@ -1829,6 +1833,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler ProgressBar mLoadImageProgressBar; @BindView(R.id.load_image_error_text_view_item_post_detail_video_and_gif_preview) TextView mLoadImageErrorTextView; + @BindView(R.id.video_or_gif_indicator_image_view_item_post_detail) + ImageView videoOrGifIndicatorImageView; @BindView(R.id.image_view_item_post_detail_video_and_gif_preview) AspectRatioGifImageView mImageView; @BindView(R.id.bottom_constraint_layout_item_post_detail_video_and_gif_preview) @@ -1872,6 +1878,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler mSaveButton, mShareButton); + videoOrGifIndicatorImageView.setColorFilter(mMediaIndicatorIconTint, PorterDuff.Mode.SRC_IN); + videoOrGifIndicatorImageView.setBackgroundTintList(ColorStateList.valueOf(mMediaIndicatorBackgroundColor)); mLoadImageProgressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); mLoadImageErrorTextView.setTextColor(mPrimaryTextColor); @@ -2284,6 +2292,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler ProgressBar mLoadImageProgressBar; @BindView(R.id.load_image_error_text_view_item_post_detail_gallery) TextView mLoadImageErrorTextView; + @BindView(R.id.video_or_gif_indicator_image_view_item_post_detail) + ImageView videoOrGifIndicatorImageView; @BindView(R.id.image_view_item_post_detail_gallery) AspectRatioGifImageView mImageView; @BindView(R.id.image_view_no_preview_link_item_post_detail_gallery) @@ -2329,6 +2339,8 @@ public class PostDetailRecyclerViewAdapter extends RecyclerView.Adapter<Recycler mSaveButton, mShareButton); + videoOrGifIndicatorImageView.setColorFilter(mMediaIndicatorIconTint, PorterDuff.Mode.SRC_IN); + videoOrGifIndicatorImageView.setBackgroundTintList(ColorStateList.valueOf(mMediaIndicatorBackgroundColor)); mLoadImageProgressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); mLoadImageErrorTextView.setTextColor(mPrimaryTextColor); mNoPreviewPostTypeImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); 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 8ba3c52d..b35eadaf 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -163,6 +163,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie private int mArchivedIconTint; private int mLockedIconTint; private int mCrosspostIconTint; + private int mMediaIndicatorIconTint; + private int mMediaIndicatorBackgroundColor; private int mNoPreviewPostTypeBackgroundColor; private int mNoPreviewPostTypeIconTint; private int mUpvotedColor; @@ -306,6 +308,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie mArchivedIconTint = customThemeWrapper.getArchivedIconTint(); mLockedIconTint = customThemeWrapper.getLockedIconTint(); mCrosspostIconTint = customThemeWrapper.getCrosspostIconTint(); + mMediaIndicatorIconTint = customThemeWrapper.getMediaIndicatorIconColor(); + mMediaIndicatorBackgroundColor = customThemeWrapper.getMediaIndicatorBackgroundColor(); mNoPreviewPostTypeBackgroundColor = customThemeWrapper.getNoPreviewPostTypeBackgroundColor(); mNoPreviewPostTypeIconTint = customThemeWrapper.getNoPreviewPostTypeIconTint(); mUpvotedColor = customThemeWrapper.getUpvoted(); @@ -2924,6 +2928,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie noPreviewLinkImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); noPreviewLinkImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); progressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); + videoOrGifIndicatorImageView.setColorFilter(mMediaIndicatorIconTint, PorterDuff.Mode.SRC_IN); + videoOrGifIndicatorImageView.setBackgroundTintList(ColorStateList.valueOf(mMediaIndicatorBackgroundColor)); errorTextView.setTextColor(mPrimaryTextColor); imageView.setOnClickListener(view -> { @@ -3741,6 +3747,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie progressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); noPreviewImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); noPreviewImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); + videoOrGifIndicatorImageView.setColorFilter(mMediaIndicatorIconTint, PorterDuff.Mode.SRC_IN); + videoOrGifIndicatorImageView.setBackgroundTintList(ColorStateList.valueOf(mMediaIndicatorBackgroundColor)); errorTextView.setTextColor(mPrimaryTextColor); itemView.setOnClickListener(view -> { @@ -4144,6 +4152,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie noPreviewImageView.setBackgroundColor(mNoPreviewPostTypeBackgroundColor); noPreviewImageView.setColorFilter(mNoPreviewPostTypeIconTint, android.graphics.PorterDuff.Mode.SRC_IN); progressBar.setIndeterminateTintList(ColorStateList.valueOf(mColorAccent)); + videoOrGifIndicatorImageView.setColorFilter(mMediaIndicatorIconTint, PorterDuff.Mode.SRC_IN); + videoOrGifIndicatorImageView.setBackgroundTintList(ColorStateList.valueOf(mMediaIndicatorBackgroundColor)); errorTextView.setTextColor(mPrimaryTextColor); divider.setBackgroundColor(mDividerColor); |