diff options
author | Alex Ning <chineseperson5@gmail.com> | 2020-07-05 03:34:05 +0000 |
---|---|---|
committer | Alex Ning <chineseperson5@gmail.com> | 2020-07-05 03:34:05 +0000 |
commit | 9ee22c30984205ad53dbd3eed57b19c0285ae110 (patch) | |
tree | fd252ba59149b76a18a46f93fd9a2784f49a11c0 | |
parent | 90f741e9e110e408a8f37290e074cb250ac664fd (diff) | |
download | infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.tar infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.tar.gz infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.tar.bz2 infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.tar.lz infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.tar.xz infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.tar.zst infinity-for-reddit-9ee22c30984205ad53dbd3eed57b19c0285ae110.zip |
Fix themeing problems for recently-added features.
4 files changed, 36 insertions, 17 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index f815b3c6..9ffa7d11 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -827,8 +827,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy mCommentMarkwon.setMarkdown(((CommentViewHolder) holder).commentMarkdownView, comment.getCommentMarkdown()); ((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, comment.getScore() + comment.getVoteType())); - ((CommentViewHolder) holder).topScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, - comment.getScore() + comment.getVoteType()) + " pts"); + ((CommentViewHolder) holder).topScoreTextView.setText(mActivity.getString(R.string.top_score, + Utils.getNVotes(mShowAbsoluteNumberOfVotes, + comment.getScore() + comment.getVoteType()))); ((CommentViewHolder) holder).itemView.setPadding(comment.getDepth() * 8, 0, 0, 0); if (comment.getDepth() > 0) { @@ -927,7 +928,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy } else { ((CommentFullyCollapsedViewHolder) holder).commentTimeTextView.setText(Utils.getFormattedTime(mLocale, comment.getCommentTimeMillis(), mTimeFormatPattern)); } - ((CommentFullyCollapsedViewHolder) holder).scoreTextView.setText(Integer.toString(comment.getScore())); + ((CommentFullyCollapsedViewHolder) holder).scoreTextView.setText(mActivity.getString(R.string.top_score, + Utils.getNVotes(mShowAbsoluteNumberOfVotes, comment.getScore() + comment.getVoteType()))); ((CommentFullyCollapsedViewHolder) holder).itemView.setPadding(comment.getDepth() * 8, 0, 0, 0); if (comment.getDepth() > 0) { @@ -2896,8 +2898,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, comment.getScore() + comment.getVoteType())); - topScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, - comment.getScore() + comment.getVoteType()) + " pts"); + topScoreTextView.setText(mActivity.getString(R.string.top_score, + Utils.getNVotes(mShowAbsoluteNumberOfVotes, + comment.getScore() + comment.getVoteType()))); VoteThing.voteThing(mActivity, mOauthRetrofit, mAccessToken, new VoteThing.VoteThingListener() { @Override @@ -2915,8 +2918,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy downvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, comment.getScore() + comment.getVoteType())); - topScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, - comment.getScore() + comment.getVoteType()) + " pts"); + topScoreTextView.setText(mActivity.getString(R.string.top_score, + Utils.getNVotes(mShowAbsoluteNumberOfVotes, + comment.getScore() + comment.getVoteType()))); } @Override @@ -2958,8 +2962,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, comment.getScore() + comment.getVoteType())); - topScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, - comment.getScore() + comment.getVoteType()) + " pts"); + topScoreTextView.setText(mActivity.getString(R.string.top_score, + Utils.getNVotes(mShowAbsoluteNumberOfVotes, + comment.getScore() + comment.getVoteType()))); VoteThing.voteThing(mActivity, mOauthRetrofit, mAccessToken, new VoteThing.VoteThingListener() { @Override @@ -2977,8 +2982,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy upvoteButton.setColorFilter(mCommentIconAndInfoColor, android.graphics.PorterDuff.Mode.SRC_IN); scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, comment.getScore() + comment.getVoteType())); - topScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, - comment.getScore() + comment.getVoteType()) + " pts"); + topScoreTextView.setText(mActivity.getString(R.string.top_score, + Utils.getNVotes(mShowAbsoluteNumberOfVotes, + comment.getScore() + comment.getVoteType()))); } @Override @@ -3129,7 +3135,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy itemView.setBackgroundColor(mFullyCollapsedCommentBackgroundColor); usernameTextView.setTextColor(mUsernameColor); - scoreTextView.setTextColor(mCommentIconAndInfoColor); + scoreTextView.setTextColor(mSecondaryTextColor); commentTimeTextView.setTextColor(mSecondaryTextColor); if (mShowCommentDivider) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java index 3ed4951b..7a720586 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Utils/CustomThemeSharedPreferencesUtils.java @@ -155,6 +155,14 @@ public class CustomThemeSharedPreferencesUtils { editor.putInt(COMMENT_VERTICAL_BAR_COLOR_7, customTheme.commentVerticalBarColor7); editor.putInt(FAB_ICON_COLOR, customTheme.fabIconColor); editor.putInt(CHIP_TEXT_COLOR, customTheme.chipTextColor); + editor.putInt(LINK_COLOR, customTheme.linkColor); + editor.putInt(RECEIVED_MESSAGE_TEXT_COLOR, customTheme.receivedMessageTextColor); + editor.putInt(SENT_MESSAGE_TEXT_COLOR, customTheme.sentMessageTextColor); + editor.putInt(RECEIVED_MESSAGE_BACKROUND_COLOR, customTheme.receivedMessageBackgroundColor); + editor.putInt(SENT_MESSAGE_BACKGROUND_COLOR, customTheme.sentMessageBackgroundColor); + editor.putInt(SEND_MESSAGE_ICON_COLOR, customTheme.sendMessageIconColor); + editor.putInt(FULLY_COLLAPSED_COMMENT_BACKGROUND_COLOR, customTheme.fullyCollapsedCommentBackgroundColor); + editor.putInt(AWARDED_COMMENT_BACKGROUND_COLOR, customTheme.awardedCommentBackgroundColor); editor.putBoolean(LIGHT_STATUS_BAR, customTheme.isLightStatusBar); editor.putBoolean(LIGHT_NAV_BAR, customTheme.isLightNavBar); editor.putBoolean(CHANGE_STATUS_BAR_ICON_COLOR_AFTER_TOOLBAR_COLLAPSED_IN_IMMERSIVE_INTERFACE, customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface); diff --git a/app/src/main/res/layout/item_comment_fully_collapsed.xml b/app/src/main/res/layout/item_comment_fully_collapsed.xml index c11085c5..d6e5110c 100644 --- a/app/src/main/res/layout/item_comment_fully_collapsed.xml +++ b/app/src/main/res/layout/item_comment_fully_collapsed.xml @@ -18,8 +18,8 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:paddingTop="8dp" - android:paddingBottom="8dp" + android:paddingTop="12dp" + android:paddingBottom="12dp" android:paddingStart="16dp" android:paddingEnd="8dp" android:textSize="?attr/font_default" @@ -29,7 +29,10 @@ android:id="@+id/score_text_view_item_comment_fully_collapsed" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:padding="8dp" + android:paddingTop="12dp" + android:paddingBottom="12dp" + android:paddingStart="8dp" + android:paddingEnd="8dp" android:textSize="?attr/font_default" android:fontFamily="?attr/font_family" /> @@ -38,8 +41,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="end" - android:paddingTop="8dp" - android:paddingBottom="8dp" + android:paddingTop="12dp" + android:paddingBottom="12dp" android:paddingStart="8dp" android:paddingEnd="16dp" android:textSize="?attr/font_default" diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 24b4164c..72f64124 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -816,4 +816,6 @@ <string name="load_video_in_redgifs">Try loading the video on Redgifs</string> + <string name="top_score">%1$s pts</string> + </resources> |