diff options
author | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-11 20:26:19 +0000 |
---|---|---|
committer | Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> | 2023-09-11 20:26:19 +0000 |
commit | 5e81ac03816846d44f376fc50a04dadd59c7e996 (patch) | |
tree | c4e5fdcee73bf66e076a7edf0ff0f516c7e32235 /app/src/main/java | |
parent | 1eb00f2a675599e213fd2579e1446a2c222063b8 (diff) | |
download | infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.tar infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.tar.gz infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.tar.bz2 infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.tar.lz infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.tar.xz infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.tar.zst infinity-for-reddit-5e81ac03816846d44f376fc50a04dadd59c7e996.zip |
Continue adding Card Layout 3.
Diffstat (limited to 'app/src/main/java')
-rw-r--r-- | app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java | 15 |
1 files changed, 11 insertions, 4 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 c9d96cef..17d3e930 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java @@ -1784,11 +1784,15 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie switch (post.getVoteType()) { case 1: //Upvoted - ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setBackgroundTintList(ColorStateList.valueOf(mUpvotedColor)); + ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setTextColor(mUpvotedColor); + ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setIconResource(R.drawable.ic_upvote_filled_24dp); + ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setIconTint(ColorStateList.valueOf(mUpvotedColor)); break; case -1: //Downvoted - ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setBackgroundTintList(ColorStateList.valueOf(mDownvotedColor)); + ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setTextColor(mDownvotedColor); + ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setIconResource(R.drawable.ic_downvote_filled_24dp); + ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setIconTint(ColorStateList.valueOf(mDownvotedColor)); break; } @@ -2697,9 +2701,12 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie ((PostMaterial3CardBaseViewHolder) holder).flairTextView.setVisibility(View.GONE); ((PostMaterial3CardBaseViewHolder) holder).awardsTextView.setText(""); ((PostMaterial3CardBaseViewHolder) holder).awardsTextView.setVisibility(View.GONE); - ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setBackgroundTintList(ColorStateList.valueOf(mPostIconAndInfoColor)); ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setTextColor(mPostIconAndInfoColor); - ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setBackgroundTintList(ColorStateList.valueOf(mPostIconAndInfoColor)); + ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setIconResource(R.drawable.ic_upvote_24dp); + ((PostMaterial3CardBaseViewHolder) holder).upvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor)); + ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setTextColor(mPostIconAndInfoColor); + ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setIconResource(R.drawable.ic_downvote_24dp); + ((PostMaterial3CardBaseViewHolder) holder).downvoteButton.setIconTint(ColorStateList.valueOf(mPostIconAndInfoColor)); } } |