aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java12
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java17
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomTheme.java136
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java8
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java32
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java4
-rw-r--r--app/src/main/res/values/strings.xml4
7 files changed, 139 insertions, 74 deletions
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java
index 959330f7..e4fb282f 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/RedditDataRoomDatabase.java
@@ -38,7 +38,7 @@ import ml.docilealligator.infinityforreddit.user.UserData;
@Database(entities = {Account.class, SubredditData.class, SubscribedSubredditData.class, UserData.class,
SubscribedUserData.class, MultiReddit.class, CustomTheme.class, RecentSearchQuery.class,
- ReadPost.class, PostFilter.class, PostFilterUsage.class, AnonymousMultiredditSubreddit.class}, version = 23)
+ ReadPost.class, PostFilter.class, PostFilterUsage.class, AnonymousMultiredditSubreddit.class}, version = 24)
public abstract class RedditDataRoomDatabase extends RoomDatabase {
public static RedditDataRoomDatabase create(final Context context) {
@@ -49,7 +49,7 @@ public abstract class RedditDataRoomDatabase extends RoomDatabase {
MIGRATION_9_10, MIGRATION_10_11, MIGRATION_11_12, MIGRATION_12_13,
MIGRATION_13_14, MIGRATION_14_15, MIGRATION_15_16, MIGRATION_16_17,
MIGRATION_17_18, MIGRATION_18_19, MIGRATION_19_20, MIGRATION_20_21,
- MIGRATION_21_22, MIGRATION_22_23)
+ MIGRATION_21_22, MIGRATION_22_23, MIGRATION_23_24)
.build();
}
@@ -383,4 +383,12 @@ public abstract class RedditDataRoomDatabase extends RoomDatabase {
}
}
};
+
+ private static final Migration MIGRATION_23_24 = new Migration(23, 24) {
+ @Override
+ public void migrate(@NonNull SupportSQLiteDatabase database) {
+ database.execSQL("ALTER TABLE custom_themes ADD COLUMN filled_card_view_background_color INTEGER DEFAULT " + Color.parseColor("#FFF6F5") + " NOT NULL");
+ database.execSQL("ALTER TABLE custom_themes ADD COLUMN read_post_filled_card_view_background_color INTEGER DEFAULT " + Color.parseColor("#F5F5F5") + " NOT NULL");
+ }
+ };
}
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 06d5bf82..1123188d 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/adapters/PostRecyclerViewAdapter.java
@@ -5,7 +5,6 @@ import android.content.SharedPreferences;
import android.content.res.ColorStateList;
import android.content.res.Configuration;
import android.content.res.Resources;
-import android.graphics.Color;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.net.Uri;
@@ -182,6 +181,8 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
private int mColorAccent;
private int mCardViewBackgroundColor;
private int mReadPostCardViewBackgroundColor;
+ private int mFilledCardViewBackgroundColor;
+ private int mReadPostFilledCardViewBackgroundColor;
private int mPrimaryTextColor;
private int mSecondaryTextColor;
private int mPostTitleColor;
@@ -336,9 +337,11 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
mDefaultLinkPostLayout = Integer.parseInt(sharedPreferences.getString(SharedPreferencesUtils.DEFAULT_LINK_POST_LAYOUT_KEY, "-1"));
mColorAccent = customThemeWrapper.getColorAccent();
- //mCardViewBackgroundColor = customThemeWrapper.getCardViewBackgroundColor();
- mCardViewBackgroundColor = Color.parseColor("#FBEEFC");
+ mCardViewBackgroundColor = customThemeWrapper.getCardViewBackgroundColor();
+ //mCardViewBackgroundColor = Color.parseColor("#FBEEFC");
mReadPostCardViewBackgroundColor = customThemeWrapper.getReadPostCardViewBackgroundColor();
+ mFilledCardViewBackgroundColor = customThemeWrapper.getFilledCardViewBackgroundColor();
+ mReadPostFilledCardViewBackgroundColor = customThemeWrapper.getReadPostFilledCardViewBackgroundColor();
mPrimaryTextColor = customThemeWrapper.getPrimaryTextColor();
mSecondaryTextColor = customThemeWrapper.getSecondaryTextColor();
mPostTitleColor = customThemeWrapper.getPostTitleColor();
@@ -1702,7 +1705,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
((PostMaterial3CardBaseViewHolder) holder).post = post;
((PostMaterial3CardBaseViewHolder) holder).currentPosition = position;
if (post.isRead()) {
- holder.itemView.setBackgroundTintList(ColorStateList.valueOf(mReadPostCardViewBackgroundColor));
+ holder.itemView.setBackgroundTintList(ColorStateList.valueOf(mReadPostFilledCardViewBackgroundColor));
((PostMaterial3CardBaseViewHolder) holder).titleTextView.setTextColor(mReadPostTitleColor);
}
String authorPrefixed = "u/" + post.getAuthor();
@@ -2500,7 +2503,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
((PostMaterial3CardBaseViewHolder) holder).markPostRead(post, false);
}
}
- holder.itemView.setBackgroundTintList(ColorStateList.valueOf(mCardViewBackgroundColor));
+ holder.itemView.setBackgroundTintList(ColorStateList.valueOf(mFilledCardViewBackgroundColor));
mGlide.clear(((PostMaterial3CardBaseViewHolder) holder).iconGifImageView);
((PostMaterial3CardBaseViewHolder) holder).titleTextView.setTextColor(mPostTitleColor);
if (holder instanceof PostMaterial3CardBaseVideoAutoplayViewHolder) {
@@ -5612,7 +5615,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
constraintSet.applyTo(bottomConstraintLayout);
}
- itemView.setBackgroundTintList(ColorStateList.valueOf(mCardViewBackgroundColor));
+ itemView.setBackgroundTintList(ColorStateList.valueOf(mFilledCardViewBackgroundColor));
if (mActivity.typeface != null) {
subredditTextView.setTypeface(mActivity.typeface);
@@ -6021,7 +6024,7 @@ public class PostRecyclerViewAdapter extends PagingDataAdapter<Post, RecyclerVie
if (mAccessToken != null && !post.isRead() && mMarkPostsAsRead) {
post.markAsRead();
if (changePostItemColor) {
- itemView.setBackgroundTintList(ColorStateList.valueOf(mReadPostCardViewBackgroundColor));
+ itemView.setBackgroundTintList(ColorStateList.valueOf(mReadPostFilledCardViewBackgroundColor));
titleTextView.setTextColor(mReadPostTitleColor);
if (this instanceof PostMaterial3CardTextTypeViewHolder) {
((PostMaterial3CardTextTypeViewHolder) this).binding.contentTextViewItemPostCard3TextType.setTextColor(mReadPostContentColor);
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomTheme.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomTheme.java
index 7acff53b..a7268335 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomTheme.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomTheme.java
@@ -64,6 +64,10 @@ public class CustomTheme {
public int cardViewBackgroundColor;
@ColumnInfo(name = "read_post_card_view_background_color")
public int readPostCardViewBackgroundColor;
+ @ColumnInfo(name = "filled_card_view_background_color")
+ public int filledCardViewBackgroundColor;
+ @ColumnInfo(name = "read_post_filled_card_view_background_color")
+ public int readPostFilledCardViewBackgroundColor;
@ColumnInfo(name = "comment_background_color")
public int commentBackgroundColor;
@ColumnInfo(name = "bottom_app_bar_background_color")
@@ -255,71 +259,73 @@ public class CustomTheme {
customTheme.backgroundColor = customThemeSettingsItems.get(19).colorValue;
customTheme.cardViewBackgroundColor = customThemeSettingsItems.get(20).colorValue;
customTheme.readPostCardViewBackgroundColor = customThemeSettingsItems.get(21).colorValue;
- customTheme.commentBackgroundColor = customThemeSettingsItems.get(22).colorValue;
- customTheme.fullyCollapsedCommentBackgroundColor = customThemeSettingsItems.get(23).colorValue;
- customTheme.awardedCommentBackgroundColor = customThemeSettingsItems.get(24).colorValue;
- customTheme.receivedMessageBackgroundColor = customThemeSettingsItems.get(25).colorValue;
- customTheme.sentMessageBackgroundColor = customThemeSettingsItems.get(26).colorValue;
- customTheme.bottomAppBarBackgroundColor = customThemeSettingsItems.get(27).colorValue;
- customTheme.primaryIconColor = customThemeSettingsItems.get(28).colorValue;
- customTheme.bottomAppBarIconColor = customThemeSettingsItems.get(29).colorValue;
- customTheme.postIconAndInfoColor = customThemeSettingsItems.get(30).colorValue;
- customTheme.commentIconAndInfoColor = customThemeSettingsItems.get(31).colorValue;
- customTheme.fabIconColor = customThemeSettingsItems.get(32).colorValue;
- customTheme.sendMessageIconColor = customThemeSettingsItems.get(33).colorValue;
- customTheme.toolbarPrimaryTextAndIconColor = customThemeSettingsItems.get(34).colorValue;
- customTheme.toolbarSecondaryTextColor = customThemeSettingsItems.get(35).colorValue;
- customTheme.circularProgressBarBackground = customThemeSettingsItems.get(36).colorValue;
- customTheme.mediaIndicatorIconColor = customThemeSettingsItems.get(37).colorValue;
- customTheme.mediaIndicatorBackgroundColor = customThemeSettingsItems.get(38).colorValue;
- customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground = customThemeSettingsItems.get(39).colorValue;
- customTheme.tabLayoutWithExpandedCollapsingToolbarTextColor = customThemeSettingsItems.get(40).colorValue;
- customTheme.tabLayoutWithExpandedCollapsingToolbarTabIndicator = customThemeSettingsItems.get(41).colorValue;
- customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground = customThemeSettingsItems.get(42).colorValue;
- customTheme.tabLayoutWithCollapsedCollapsingToolbarTextColor = customThemeSettingsItems.get(43).colorValue;
- customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator = customThemeSettingsItems.get(44).colorValue;
- customTheme.upvoted = customThemeSettingsItems.get(45).colorValue;
- customTheme.downvoted = customThemeSettingsItems.get(46).colorValue;
- customTheme.postTypeBackgroundColor = customThemeSettingsItems.get(47).colorValue;
- customTheme.postTypeTextColor = customThemeSettingsItems.get(48).colorValue;
- customTheme.spoilerBackgroundColor = customThemeSettingsItems.get(49).colorValue;
- customTheme.spoilerTextColor = customThemeSettingsItems.get(50).colorValue;
- customTheme.nsfwBackgroundColor = customThemeSettingsItems.get(51).colorValue;
- customTheme.nsfwTextColor = customThemeSettingsItems.get(52).colorValue;
- customTheme.flairBackgroundColor = customThemeSettingsItems.get(53).colorValue;
- customTheme.flairTextColor = customThemeSettingsItems.get(54).colorValue;
- customTheme.awardsBackgroundColor = customThemeSettingsItems.get(55).colorValue;
- customTheme.awardsTextColor = customThemeSettingsItems.get(56).colorValue;
- customTheme.archivedTint = customThemeSettingsItems.get(57).colorValue;
- customTheme.lockedIconTint = customThemeSettingsItems.get(58).colorValue;
- customTheme.crosspostIconTint = customThemeSettingsItems.get(59).colorValue;
- customTheme.upvoteRatioIconTint = customThemeSettingsItems.get(60).colorValue;
- customTheme.stickiedPostIconTint = customThemeSettingsItems.get(61).colorValue;
- customTheme.noPreviewPostTypeIconTint = customThemeSettingsItems.get(62).colorValue;
- customTheme.subscribed = customThemeSettingsItems.get(63).colorValue;
- customTheme.unsubscribed = customThemeSettingsItems.get(64).colorValue;
- customTheme.username = customThemeSettingsItems.get(65).colorValue;
- customTheme.subreddit = customThemeSettingsItems.get(66).colorValue;
- customTheme.authorFlairTextColor = customThemeSettingsItems.get(67).colorValue;
- customTheme.submitter = customThemeSettingsItems.get(68).colorValue;
- customTheme.moderator = customThemeSettingsItems.get(69).colorValue;
- customTheme.currentUser = customThemeSettingsItems.get(70).colorValue;
- customTheme.singleCommentThreadBackgroundColor = customThemeSettingsItems.get(71).colorValue;
- customTheme.unreadMessageBackgroundColor = customThemeSettingsItems.get(72).colorValue;
- customTheme.dividerColor = customThemeSettingsItems.get(73).colorValue;
- customTheme.noPreviewPostTypeBackgroundColor = customThemeSettingsItems.get(74).colorValue;
- customTheme.voteAndReplyUnavailableButtonColor = customThemeSettingsItems.get(75).colorValue;
- customTheme.commentVerticalBarColor1 = customThemeSettingsItems.get(76).colorValue;
- customTheme.commentVerticalBarColor2 = customThemeSettingsItems.get(77).colorValue;
- customTheme.commentVerticalBarColor3 = customThemeSettingsItems.get(78).colorValue;
- customTheme.commentVerticalBarColor4 = customThemeSettingsItems.get(79).colorValue;
- customTheme.commentVerticalBarColor5 = customThemeSettingsItems.get(80).colorValue;
- customTheme.commentVerticalBarColor6 = customThemeSettingsItems.get(81).colorValue;
- customTheme.commentVerticalBarColor7 = customThemeSettingsItems.get(82).colorValue;
- customTheme.navBarColor = customThemeSettingsItems.get(83).colorValue;
- customTheme.isLightStatusBar = customThemeSettingsItems.get(84).isEnabled;
- customTheme.isLightNavBar = customThemeSettingsItems.get(85).isEnabled;
- customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = customThemeSettingsItems.get(86).isEnabled;
+ customTheme.filledCardViewBackgroundColor = customThemeSettingsItems.get(22).colorValue;
+ customTheme.readPostFilledCardViewBackgroundColor = customThemeSettingsItems.get(23).colorValue;
+ customTheme.commentBackgroundColor = customThemeSettingsItems.get(24).colorValue;
+ customTheme.fullyCollapsedCommentBackgroundColor = customThemeSettingsItems.get(25).colorValue;
+ customTheme.awardedCommentBackgroundColor = customThemeSettingsItems.get(26).colorValue;
+ customTheme.receivedMessageBackgroundColor = customThemeSettingsItems.get(27).colorValue;
+ customTheme.sentMessageBackgroundColor = customThemeSettingsItems.get(28).colorValue;
+ customTheme.bottomAppBarBackgroundColor = customThemeSettingsItems.get(29).colorValue;
+ customTheme.primaryIconColor = customThemeSettingsItems.get(30).colorValue;
+ customTheme.bottomAppBarIconColor = customThemeSettingsItems.get(31).colorValue;
+ customTheme.postIconAndInfoColor = customThemeSettingsItems.get(32).colorValue;
+ customTheme.commentIconAndInfoColor = customThemeSettingsItems.get(33).colorValue;
+ customTheme.fabIconColor = customThemeSettingsItems.get(34).colorValue;
+ customTheme.sendMessageIconColor = customThemeSettingsItems.get(35).colorValue;
+ customTheme.toolbarPrimaryTextAndIconColor = customThemeSettingsItems.get(36).colorValue;
+ customTheme.toolbarSecondaryTextColor = customThemeSettingsItems.get(37).colorValue;
+ customTheme.circularProgressBarBackground = customThemeSettingsItems.get(38).colorValue;
+ customTheme.mediaIndicatorIconColor = customThemeSettingsItems.get(39).colorValue;
+ customTheme.mediaIndicatorBackgroundColor = customThemeSettingsItems.get(40).colorValue;
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground = customThemeSettingsItems.get(41).colorValue;
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTextColor = customThemeSettingsItems.get(42).colorValue;
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabIndicator = customThemeSettingsItems.get(43).colorValue;
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground = customThemeSettingsItems.get(44).colorValue;
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTextColor = customThemeSettingsItems.get(45).colorValue;
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator = customThemeSettingsItems.get(46).colorValue;
+ customTheme.upvoted = customThemeSettingsItems.get(47).colorValue;
+ customTheme.downvoted = customThemeSettingsItems.get(48).colorValue;
+ customTheme.postTypeBackgroundColor = customThemeSettingsItems.get(49).colorValue;
+ customTheme.postTypeTextColor = customThemeSettingsItems.get(50).colorValue;
+ customTheme.spoilerBackgroundColor = customThemeSettingsItems.get(51).colorValue;
+ customTheme.spoilerTextColor = customThemeSettingsItems.get(52).colorValue;
+ customTheme.nsfwBackgroundColor = customThemeSettingsItems.get(53).colorValue;
+ customTheme.nsfwTextColor = customThemeSettingsItems.get(54).colorValue;
+ customTheme.flairBackgroundColor = customThemeSettingsItems.get(55).colorValue;
+ customTheme.flairTextColor = customThemeSettingsItems.get(56).colorValue;
+ customTheme.awardsBackgroundColor = customThemeSettingsItems.get(57).colorValue;
+ customTheme.awardsTextColor = customThemeSettingsItems.get(58).colorValue;
+ customTheme.archivedTint = customThemeSettingsItems.get(59).colorValue;
+ customTheme.lockedIconTint = customThemeSettingsItems.get(60).colorValue;
+ customTheme.crosspostIconTint = customThemeSettingsItems.get(61).colorValue;
+ customTheme.upvoteRatioIconTint = customThemeSettingsItems.get(62).colorValue;
+ customTheme.stickiedPostIconTint = customThemeSettingsItems.get(63).colorValue;
+ customTheme.noPreviewPostTypeIconTint = customThemeSettingsItems.get(64).colorValue;
+ customTheme.subscribed = customThemeSettingsItems.get(65).colorValue;
+ customTheme.unsubscribed = customThemeSettingsItems.get(66).colorValue;
+ customTheme.username = customThemeSettingsItems.get(67).colorValue;
+ customTheme.subreddit = customThemeSettingsItems.get(68).colorValue;
+ customTheme.authorFlairTextColor = customThemeSettingsItems.get(69).colorValue;
+ customTheme.submitter = customThemeSettingsItems.get(70).colorValue;
+ customTheme.moderator = customThemeSettingsItems.get(71).colorValue;
+ customTheme.currentUser = customThemeSettingsItems.get(72).colorValue;
+ customTheme.singleCommentThreadBackgroundColor = customThemeSettingsItems.get(73).colorValue;
+ customTheme.unreadMessageBackgroundColor = customThemeSettingsItems.get(74).colorValue;
+ customTheme.dividerColor = customThemeSettingsItems.get(75).colorValue;
+ customTheme.noPreviewPostTypeBackgroundColor = customThemeSettingsItems.get(76).colorValue;
+ customTheme.voteAndReplyUnavailableButtonColor = customThemeSettingsItems.get(77).colorValue;
+ customTheme.commentVerticalBarColor1 = customThemeSettingsItems.get(78).colorValue;
+ customTheme.commentVerticalBarColor2 = customThemeSettingsItems.get(79).colorValue;
+ customTheme.commentVerticalBarColor3 = customThemeSettingsItems.get(80).colorValue;
+ customTheme.commentVerticalBarColor4 = customThemeSettingsItems.get(81).colorValue;
+ customTheme.commentVerticalBarColor5 = customThemeSettingsItems.get(82).colorValue;
+ customTheme.commentVerticalBarColor6 = customThemeSettingsItems.get(83).colorValue;
+ customTheme.commentVerticalBarColor7 = customThemeSettingsItems.get(84).colorValue;
+ customTheme.navBarColor = customThemeSettingsItems.get(85).colorValue;
+ customTheme.isLightStatusBar = customThemeSettingsItems.get(86).isEnabled;
+ customTheme.isLightNavBar = customThemeSettingsItems.get(87).isEnabled;
+ customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = customThemeSettingsItems.get(88).isEnabled;
return customTheme;
}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java
index 2d9fadd6..95618f88 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeSettingsItem.java
@@ -145,6 +145,14 @@ public class CustomThemeSettingsItem implements Parcelable {
context.getString(R.string.theme_item_read_post_card_view_background_color_detail),
customTheme.readPostCardViewBackgroundColor));
customThemeSettingsItems.add(new CustomThemeSettingsItem(
+ context.getString(R.string.theme_item_filled_card_view_background_color),
+ context.getString(R.string.theme_item_filled_card_view_background_color_detail),
+ customTheme.filledCardViewBackgroundColor));
+ customThemeSettingsItems.add(new CustomThemeSettingsItem(
+ context.getString(R.string.theme_item_read_post_filled_card_view_background_color),
+ context.getString(R.string.theme_item_read_post_filled_card_view_background_color_detail),
+ customTheme.readPostFilledCardViewBackgroundColor));
+ customThemeSettingsItems.add(new CustomThemeSettingsItem(
context.getString(R.string.theme_item_comment_background_color),
context.getString(R.string.theme_item_comment_background_color_detail),
customTheme.commentBackgroundColor));
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java
index 04a32281..d80b9b29 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/customtheme/CustomThemeWrapper.java
@@ -127,6 +127,16 @@ public class CustomThemeWrapper {
getDefaultColor("#F5F5F5", "#101010", "#000000"));
}
+ public int getFilledCardViewBackgroundColor() {
+ return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.FILLED_CARD_VIEW_BACKGROUND_COLOR,
+ getDefaultColor("#FFF6F5", "#242424", "#000000"));
+ }
+
+ public int getReadPostFilledCardViewBackgroundColor() {
+ return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.READ_POST_FILLED_CARD_VIEW_BACKGROUND_COLOR,
+ getDefaultColor("#F5F5F5", "#101010", "#000000"));
+ }
+
public int getCommentBackgroundColor() {
return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.COMMENT_BACKGROUND_COLOR,
getDefaultColor("#FFFFFF", "#242424", "#000000"));
@@ -534,6 +544,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#FFFFFF");
customTheme.cardViewBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#F5F5F5");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.primaryIconColor = Color.parseColor("#000000");
@@ -627,6 +639,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#121212");
customTheme.cardViewBackgroundColor = Color.parseColor("#242424");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#101010");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#242424");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#121212");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -720,6 +734,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#000000");
customTheme.cardViewBackgroundColor = Color.parseColor("#000000");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#000000");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#000000");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#000000");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -813,6 +829,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#FFFFFF");
customTheme.cardViewBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#F5F5F5");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.primaryIconColor = Color.parseColor("#000000");
@@ -906,6 +924,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#121212");
customTheme.cardViewBackgroundColor = Color.parseColor("#242424");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#101010");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#242424");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#121212");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -999,6 +1019,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#000000");
customTheme.cardViewBackgroundColor = Color.parseColor("#000000");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#000000");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#000000");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#000000");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -1092,6 +1114,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#FFFFFF");
customTheme.cardViewBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#F5F5F5");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#FFFFFF");
customTheme.primaryIconColor = Color.parseColor("#000000");
@@ -1185,6 +1209,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#121212");
customTheme.cardViewBackgroundColor = Color.parseColor("#242424");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#101010");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#242424");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#121212");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -1278,6 +1304,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#000000");
customTheme.cardViewBackgroundColor = Color.parseColor("#000000");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#000000");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#000000");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#000000");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -1371,6 +1399,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#282A36");
customTheme.cardViewBackgroundColor = Color.parseColor("#393A59");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#1C1F3D");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#393A59");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#393A59");
customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
@@ -1464,6 +1494,8 @@ public class CustomThemeWrapper {
customTheme.backgroundColor = Color.parseColor("#DAD0DE");
customTheme.cardViewBackgroundColor = Color.parseColor("#C0F0F4");
customTheme.readPostCardViewBackgroundColor = Color.parseColor("#D2E7EA");
+ customTheme.filledCardViewBackgroundColor = Color.parseColor("#FFF6F5");
+ customTheme.readPostFilledCardViewBackgroundColor = Color.parseColor("#F5F5F5");
customTheme.commentBackgroundColor = Color.parseColor("#C0F0F4");
customTheme.bottomAppBarBackgroundColor = Color.parseColor("#D48AE0");
customTheme.primaryIconColor = Color.parseColor("#000000");
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 03e8f9c2..c5daf67c 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/utils/CustomThemeSharedPreferencesUtils.java
@@ -29,6 +29,8 @@ public class CustomThemeSharedPreferencesUtils {
public static final String BACKGROUND_COLOR = "backgroundColor";
public static final String CARD_VIEW_BACKGROUND_COLOR = "cardViewBackgroundColor";
public static final String READ_POST_CARD_VIEW_BACKGROUND_COLOR = "readPostCardViewBackgroundColor";
+ public static final String FILLED_CARD_VIEW_BACKGROUND_COLOR = "filledCardViewBackgroundColor";
+ public static final String READ_POST_FILLED_CARD_VIEW_BACKGROUND_COLOR = "readPostFilledCardViewBackgroundColor";
public static final String COMMENT_BACKGROUND_COLOR = "commentBackgroundColor";
public static final String BOTTOM_APP_BAR_BACKGROUND_COLOR = "bottomAppBarBackgroundColor";
public static final String PRIMARY_ICON_COLOR = "primaryIconColor";
@@ -113,6 +115,8 @@ public class CustomThemeSharedPreferencesUtils {
editor.putInt(BACKGROUND_COLOR, customTheme.backgroundColor);
editor.putInt(CARD_VIEW_BACKGROUND_COLOR, customTheme.cardViewBackgroundColor);
editor.putInt(READ_POST_CARD_VIEW_BACKGROUND_COLOR, customTheme.readPostCardViewBackgroundColor);
+ editor.putInt(FILLED_CARD_VIEW_BACKGROUND_COLOR, customTheme.filledCardViewBackgroundColor);
+ editor.putInt(READ_POST_FILLED_CARD_VIEW_BACKGROUND_COLOR, customTheme.readPostFilledCardViewBackgroundColor);
editor.putInt(COMMENT_BACKGROUND_COLOR, customTheme.commentBackgroundColor);
editor.putInt(BOTTOM_APP_BAR_BACKGROUND_COLOR, customTheme.bottomAppBarBackgroundColor);
editor.putInt(PRIMARY_ICON_COLOR, customTheme.primaryIconColor);
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 1aaeb2ec..c6e755e8 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -803,6 +803,10 @@
<string name="theme_item_card_view_background_color_detail">Applied to: Post background and message background</string>
<string name="theme_item_read_post_card_view_background_color">Read Post Card View Background Color</string>
<string name="theme_item_read_post_card_view_background_color_detail">Applied to: Read Post background</string>
+ <string name="theme_item_filled_card_view_background_color">Filled Card View Background Color</string>
+ <string name="theme_item_filled_card_view_background_color_detail">Applied to: Background of a post in a filled card view, some edit text fields</string>
+ <string name="theme_item_read_post_filled_card_view_background_color">Read Post Filled Card View Background Color</string>
+ <string name="theme_item_read_post_filled_card_view_background_color_detail">Applied to: Background of a read post in a filled card view</string>
<string name="theme_item_comment_background_color">Comment Background Color</string>
<string name="theme_item_comment_background_color_detail">Applied to: Comment background</string>
<string name="theme_item_fully_collapsed_comment_background_color">Fully-Collapsed Comment Background Color</string>