diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index b13132c7..233d5efc 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -21,7 +21,9 @@
android:theme="@style/AppTheme"
android:usesCleartextTraffic="true"
tools:replace="android:label">
-
+
customThemeLiveData;
- switch (themeType) {
- case EXTRA_DARK_THEME:
- toolbar.setTitle(getString(R.string.customize_dark_theme_fragment_title));
- customThemeLiveData = customThemeViewModel.getDarkCustomTheme();
- break;
- case EXTRA_AMOLED_THEME:
- toolbar.setTitle(getString(R.string.customize_amoled_theme_fragment_title));
- customThemeLiveData = customThemeViewModel.getAmoledCustomTheme();
- break;
- default:
- toolbar.setTitle(getString(R.string.customize_light_theme_fragment_title));
- customThemeLiveData = customThemeViewModel.getLightCustomTheme();
- break;
- }
-
int androidVersion = Build.VERSION.SDK_INT;
- customThemeLiveData.observe(this, new Observer() {
- @Override
- public void onChanged(CustomTheme customTheme) {
- ArrayList customThemeSettingsItems =
- CustomThemeSettingsItem.convertCustomTheme(CustomizeThemeActivity.this, customTheme);
+ if (getIntent().hasExtra(EXTRA_THEME_TYPE)) {
+ LiveData customThemeLiveData;
+ int themeType = getIntent().getIntExtra(EXTRA_THEME_TYPE, EXTRA_LIGHT_THEME);
+ switch (themeType) {
+ case EXTRA_DARK_THEME:
+ setTitle(getString(R.string.customize_dark_theme_fragment_title));
+ customThemeLiveData = customThemeViewModel.getDarkCustomTheme();
+ break;
+ case EXTRA_AMOLED_THEME:
+ setTitle(getString(R.string.customize_amoled_theme_fragment_title));
+ customThemeLiveData = customThemeViewModel.getAmoledCustomTheme();
+ break;
+ default:
+ setTitle(getString(R.string.customize_light_theme_fragment_title));
+ customThemeLiveData = customThemeViewModel.getLightCustomTheme();
+ break;
+ }
+
+ customThemeLiveData.observe(this, customTheme -> {
+ ArrayList customThemeSettingsItems;
+ if (customTheme == null) {
+ switch (themeType) {
+ case EXTRA_DARK_THEME:
+ customThemeSettingsItems = CustomThemeSettingsItem.convertCustomThemeToSettingsItem(
+ CustomizeThemeActivity.this,
+ CustomThemeWrapper.getIndigoDark(CustomizeThemeActivity.this));
+ break;
+ case EXTRA_AMOLED_THEME:
+ customThemeSettingsItems = CustomThemeSettingsItem.convertCustomThemeToSettingsItem(
+ CustomizeThemeActivity.this,
+ CustomThemeWrapper.getIndigoAmoled(CustomizeThemeActivity.this));
+ break;
+ default:
+ customThemeSettingsItems = CustomThemeSettingsItem.convertCustomThemeToSettingsItem(
+ CustomizeThemeActivity.this,
+ CustomThemeWrapper.getIndigo(CustomizeThemeActivity.this));
+ }
+ } else {
+ customThemeSettingsItems = CustomThemeSettingsItem.convertCustomThemeToSettingsItem(CustomizeThemeActivity.this, customTheme);
+ }
+
if (androidVersion < Build.VERSION_CODES.O) {
customThemeSettingsItems.get(customThemeSettingsItems.size() - 2).itemDetails = getString(R.string.theme_item_available_on_android_8);
}
@@ -104,8 +126,12 @@ public class CustomizeThemeActivity extends BaseActivity {
}
adapter.setCustomThemeSettingsItem(customThemeSettingsItems);
- }
- });
+ });
+ } else {
+ new GetCustomThemeAsyncTask(redditDataRoomDatabase, getIntent().getStringExtra(EXTRA_THEME_NAME),
+ customTheme -> adapter.setCustomThemeSettingsItem(
+ CustomThemeSettingsItem.convertCustomThemeToSettingsItem(CustomizeThemeActivity.this, customTheme))).execute();
+ }
}
@Override
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java
new file mode 100644
index 00000000..9504317d
--- /dev/null
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomThemeListingRecyclerViewAdapter.java
@@ -0,0 +1,68 @@
+package ml.docilealligator.infinityforreddit.Adapter;
+
+import android.content.Context;
+import android.content.Intent;
+import android.content.res.ColorStateList;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.TextView;
+
+import androidx.annotation.NonNull;
+import androidx.recyclerview.widget.RecyclerView;
+
+import java.util.ArrayList;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import ml.docilealligator.infinityforreddit.Activity.CustomizeThemeActivity;
+import ml.docilealligator.infinityforreddit.CustomTheme.CustomTheme;
+import ml.docilealligator.infinityforreddit.R;
+
+public class CustomThemeListingRecyclerViewAdapter extends RecyclerView.Adapter {
+ private Context context;
+ private ArrayList customThemes;
+
+ public CustomThemeListingRecyclerViewAdapter(Context context) {
+ this.context = context;
+ customThemes = new ArrayList<>();
+ }
+
+ @NonNull
+ @Override
+ public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
+ return new CustomThemeViewHolder(LayoutInflater.from(parent.getContext()).inflate(R.layout.item_custom_theme, parent, false));
+ }
+
+ @Override
+ public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) {
+ if (holder instanceof CustomThemeViewHolder) {
+ CustomTheme customTheme = customThemes.get(position);
+ ((CustomThemeViewHolder) holder).colorPrimaryView.setBackgroundTintList(ColorStateList.valueOf(customTheme.colorPrimary));
+ ((CustomThemeViewHolder) holder).nameTextView.setText(customTheme.name);
+ ((CustomThemeViewHolder) holder).itemView.setOnClickListener(view -> {
+ Intent intent = new Intent(context, CustomizeThemeActivity.class);
+ intent.putExtra(CustomizeThemeActivity.EXTRA_THEME_NAME, customTheme.name);
+ context.startActivity(intent);
+ });
+ }
+ }
+
+ @Override
+ public int getItemCount() {
+ return 0;
+ }
+
+ class CustomThemeViewHolder extends RecyclerView.ViewHolder {
+
+ @BindView(R.id.color_primary_item_custom_theme)
+ View colorPrimaryView;
+ @BindView(R.id.name_text_view_item_custom_theme)
+ TextView nameTextView;
+
+ public CustomThemeViewHolder(@NonNull View itemView) {
+ super(itemView);
+ ButterKnife.bind(this, itemView);
+ }
+ }
+}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomizeThemeRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomizeThemeRecyclerViewAdapter.java
index 5bb55eea..398042de 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomizeThemeRecyclerViewAdapter.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CustomizeThemeRecyclerViewAdapter.java
@@ -39,10 +39,10 @@ public class CustomizeThemeRecyclerViewAdapter extends RecyclerView.Adapter {
+ private RedditDataRoomDatabase redditDataRoomDatabase;
+ private String customThemeName;
+ private GetCustomThemeAsyncTaskListener getCustomThemeAsyncTaskListener;
+ private CustomTheme customTheme;
+
+ public interface GetCustomThemeAsyncTaskListener {
+ void success(CustomTheme customTheme);
+ }
+
+ public GetCustomThemeAsyncTask(RedditDataRoomDatabase redditDataRoomDatabase,
+ String customThemeName,
+ GetCustomThemeAsyncTaskListener getCustomThemeAsyncTaskListener) {
+ this.redditDataRoomDatabase = redditDataRoomDatabase;
+ this.customThemeName = customThemeName;
+ this.getCustomThemeAsyncTaskListener = getCustomThemeAsyncTaskListener;
+ }
+
+ @Override
+ protected Void doInBackground(Void... voids) {
+ customTheme = redditDataRoomDatabase.customThemeDao().getCustomTheme(customThemeName);
+ return null;
+ }
+
+ @Override
+ protected void onPostExecute(Void aVoid) {
+ super.onPostExecute(aVoid);
+ getCustomThemeAsyncTaskListener.success(customTheme);
+ }
+}
diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeDao.java b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeDao.java
index 4525cf81..552cc8a7 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeDao.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeDao.java
@@ -25,9 +25,9 @@ public interface CustomThemeDao {
@Query("SELECT * FROM custom_themes WHERE is_amoled_theme = 1 LIMIT 1")
LiveData getAmoledCustomTheme();
- @Query("SELECT * FROM custom_themes WHERE name = :name AND username = :username COLLATE NOCASE LIMIT 1")
- CustomTheme getCustomTheme(String name, String username);
+ @Query("SELECT * FROM custom_themes WHERE name = :name COLLATE NOCASE LIMIT 1")
+ CustomTheme getCustomTheme(String name);
- @Query("DELETE FROM custom_themes WHERE name = :name AND username = :username")
- void deleteCustomTheme(String name, String username);
+ @Query("DELETE FROM custom_themes WHERE name = :name")
+ void deleteCustomTheme(String name);
}
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 1dfd7f59..5741d1f1 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeSettingsItem.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeSettingsItem.java
@@ -23,7 +23,7 @@ public class CustomThemeSettingsItem {
this.isEnabled = isEnabled;
}
- public static ArrayList convertCustomTheme(Context context, CustomTheme customTheme) {
+ public static ArrayList convertCustomThemeToSettingsItem(Context context, CustomTheme customTheme) {
ArrayList customThemeSettingsItems = new ArrayList<>();
if (customTheme == null) {
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 2546c9f2..b6416f53 100644
--- a/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java
+++ b/app/src/main/java/ml/docilealligator/infinityforreddit/CustomTheme/CustomThemeWrapper.java
@@ -1,8 +1,12 @@
package ml.docilealligator.infinityforreddit.CustomTheme;
+import android.content.Context;
import android.content.SharedPreferences;
import android.graphics.Color;
+import java.util.ArrayList;
+
+import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.Utils.CustomThemeSharedPreferencesUtils;
import static ml.docilealligator.infinityforreddit.Utils.CustomThemeSharedPreferencesUtils.AMOLED;
@@ -345,7 +349,7 @@ public class CustomThemeWrapper {
public int getFABIconColor() {
return getThemeSharedPreferences().getInt(CustomThemeSharedPreferencesUtils.FAB_ICON_COLOR,
- getDefaultColor("#1565C0", "#1565C0", "#1565C0"));
+ getDefaultColor("#FFFFFF", "#FFFFFF", "#FFFFFF"));
}
public int getChipTextColor() {
@@ -363,11 +367,243 @@ public class CustomThemeWrapper {
}
public boolean isLightNavBar() {
- return getThemeSharedPreferences().getBoolean(CustomThemeSharedPreferencesUtils.LIGHT_NAV_BAR, true);
+ return getThemeSharedPreferences().getBoolean(CustomThemeSharedPreferencesUtils.LIGHT_NAV_BAR,
+ themeType == CustomThemeSharedPreferencesUtils.LIGHT);
}
public boolean isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface() {
return getThemeSharedPreferences().getBoolean(
- CustomThemeSharedPreferencesUtils.CHANGE_STATUS_BAR_ICON_COLOR_AFTER_TOOLBAR_COLLAPSED_IN_IMMERSIVE_INTERFACE, true);
+ CustomThemeSharedPreferencesUtils.CHANGE_STATUS_BAR_ICON_COLOR_AFTER_TOOLBAR_COLLAPSED_IN_IMMERSIVE_INTERFACE,
+ themeType == CustomThemeSharedPreferencesUtils.LIGHT);
+ }
+
+ public static ArrayList getPredifinedThemes(Context context) {
+ ArrayList customThemes = new ArrayList<>();
+ customThemes.add(getIndigo(context));
+ customThemes.add(getIndigoDark(context));
+ customThemes.add(getIndigoAmoled(context));
+ return customThemes;
+ }
+
+ public static CustomTheme getIndigo(Context context) {
+ CustomTheme customTheme = new CustomTheme(context.getString(R.string.theme_name_indigo));
+ customTheme.isLightTheme = true;
+ customTheme.isDarkTheme = false;
+ customTheme.isAmoledTheme = false;
+ customTheme.colorPrimary = Color.parseColor("#1565C0");
+ customTheme.colorPrimaryDark = Color.parseColor("#0D47A1");
+ customTheme.colorAccent = Color.parseColor("#FF4081");
+ customTheme.colorPrimaryLightTheme = Color.parseColor("#1565C0");
+ customTheme.primaryTextColor = Color.parseColor("#000000");
+ customTheme.secondaryTextColor = Color.parseColor("#8A000000");
+ customTheme.postTitleColor = Color.parseColor("#000000");
+ customTheme.postContentColor = Color.parseColor("#8A000000");
+ customTheme.commentColor = Color.parseColor("#000000");
+ customTheme.buttonTextColor = Color.parseColor("#FFFFFF");
+ customTheme.backgroundColor = Color.parseColor("#FFFFFF");
+ customTheme.cardViewBackgroundColor = Color.parseColor("#FFFFFF");
+ customTheme.commentBackgroundColor = Color.parseColor("#FFFFFF");
+ customTheme.bottomAppBarBackgroundColor = Color.parseColor("#FFFFFF");
+ customTheme.primaryIconColor = Color.parseColor("#000000");
+ customTheme.postIconAndInfoColor = Color.parseColor("#8A000000");
+ customTheme.commentIconAndInfoColor = Color.parseColor("#8A000000");
+ customTheme.toolbarPrimaryTextAndIconColor = Color.parseColor("#FFFFFF");
+ customTheme.toolbarSecondaryTextColor = Color.parseColor("#FFFFFF");
+ customTheme.circularProgressBarBackground = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTextColor = Color.parseColor("#1565C0");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabIndicator = Color.parseColor("#1565C0");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground = Color.parseColor("#1565C0");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTextColor = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator = Color.parseColor("#FFFFFF");
+ customTheme.upvoted = Color.parseColor("#E91E63");
+ customTheme.downvoted = Color.parseColor("#007DDE");
+ customTheme.postTypeBackgroundColor = Color.parseColor("#0D47A1");
+ customTheme.postTypeTextColor = Color.parseColor("#FFFFFF");
+ customTheme.spoilerBackgroundColor = Color.parseColor("#EE02EB");
+ customTheme.spoilerTextColor = Color.parseColor("#FFFFFF");
+ customTheme.nsfwBackgroundColor = Color.parseColor("#FF4081");
+ customTheme.nsfwTextColor = Color.parseColor("#FFFFFF");
+ customTheme.flairBackgroundColor = Color.parseColor("#00AA8C");
+ customTheme.flairTextColor = Color.parseColor("#FFFFFF");
+ customTheme.archivedTint = Color.parseColor("#B4009F");
+ customTheme.lockedIconTint = Color.parseColor("#EE7302");
+ customTheme.crosspostIconTint = Color.parseColor("#FF4081");
+ customTheme.stickiedPostIconTint = Color.parseColor("#0D47A1");
+ customTheme.subscribed = Color.parseColor("#FF4081");
+ customTheme.unsubscribed = Color.parseColor("#0D47A1");
+ customTheme.username = Color.parseColor("#0D47A1");
+ customTheme.subreddit = Color.parseColor("#E91E63");
+ customTheme.authorFlairTextColor = Color.parseColor("#EE02C4");
+ customTheme.submitter = Color.parseColor("#EE8A02");
+ customTheme.moderator = Color.parseColor("#00BA81");
+ customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#B3E5F9");
+ customTheme.unreadMessageBackgroundColor = Color.parseColor("#B3E5F9");
+ customTheme.dividerColor = Color.parseColor("#E0E0E0");
+ customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#E0E0E0");
+ customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#F0F0F0");
+ customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0");
+ customTheme.commentVerticalBarColor2 = Color.parseColor("#EE02BE");
+ customTheme.commentVerticalBarColor3 = Color.parseColor("#02DFEE");
+ customTheme.commentVerticalBarColor4 = Color.parseColor("#EED502");
+ customTheme.commentVerticalBarColor5 = Color.parseColor("#EE0220");
+ customTheme.commentVerticalBarColor6 = Color.parseColor("#02EE6E");
+ customTheme.commentVerticalBarColor7 = Color.parseColor("#EE4602");
+ customTheme.fabIconColor = Color.parseColor("#FFFFFF");
+ customTheme.chipTextColor = Color.parseColor("#FFFFFF");
+ customTheme.navBarColor = Color.parseColor("#FFFFFF");
+ customTheme.isLightStatusBar = false;
+ customTheme.isLightNavBar = true;
+ customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = true;
+
+ return customTheme;
+ }
+
+ public static CustomTheme getIndigoDark(Context context) {
+ CustomTheme customTheme = new CustomTheme(context.getString(R.string.theme_name_indigo_dark));
+ customTheme.isLightTheme = false;
+ customTheme.isDarkTheme = true;
+ customTheme.isAmoledTheme = false;
+ customTheme.colorPrimary = Color.parseColor("#242424");
+ customTheme.colorPrimaryDark = Color.parseColor("#121212");
+ customTheme.colorAccent = Color.parseColor("#FF4081");
+ customTheme.colorPrimaryLightTheme = Color.parseColor("#1565C0");
+ customTheme.primaryTextColor = Color.parseColor("#FFFFFF");
+ customTheme.secondaryTextColor = Color.parseColor("#B3FFFFFF");
+ customTheme.postTitleColor = Color.parseColor("#FFFFFF");
+ customTheme.postContentColor = Color.parseColor("#B3FFFFFF");
+ customTheme.commentColor = Color.parseColor("#FFFFFF");
+ customTheme.buttonTextColor = Color.parseColor("#FFFFFF");
+ customTheme.backgroundColor = Color.parseColor("#121212");
+ customTheme.cardViewBackgroundColor = Color.parseColor("#242424");
+ customTheme.commentBackgroundColor = Color.parseColor("#242424");
+ customTheme.bottomAppBarBackgroundColor = Color.parseColor("#121212");
+ customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
+ customTheme.postIconAndInfoColor = Color.parseColor("#B3FFFFFF");
+ customTheme.commentIconAndInfoColor = Color.parseColor("#B3FFFFFF");
+ customTheme.toolbarPrimaryTextAndIconColor = Color.parseColor("#FFFFFF");
+ customTheme.toolbarSecondaryTextColor = Color.parseColor("#FFFFFF");
+ customTheme.circularProgressBarBackground = Color.parseColor("#242424");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground = Color.parseColor("#242424");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTextColor = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabIndicator = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground = Color.parseColor("#242424");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTextColor = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator = Color.parseColor("#FFFFFF");
+ customTheme.upvoted = Color.parseColor("#E91E63");
+ customTheme.downvoted = Color.parseColor("#007DDE");
+ customTheme.postTypeBackgroundColor = Color.parseColor("#1565C0");
+ customTheme.postTypeTextColor = Color.parseColor("#FFFFFF");
+ customTheme.spoilerBackgroundColor = Color.parseColor("#EE02EB");
+ customTheme.spoilerTextColor = Color.parseColor("#FFFFFF");
+ customTheme.nsfwBackgroundColor = Color.parseColor("#FF4081");
+ customTheme.nsfwTextColor = Color.parseColor("#FFFFFF");
+ customTheme.flairBackgroundColor = Color.parseColor("#00AA8C");
+ customTheme.flairTextColor = Color.parseColor("#FFFFFF");
+ customTheme.archivedTint = Color.parseColor("#B4009F");
+ customTheme.lockedIconTint = Color.parseColor("#EE7302");
+ customTheme.crosspostIconTint = Color.parseColor("#FF4081");
+ customTheme.stickiedPostIconTint = Color.parseColor("#1565C0");
+ customTheme.subscribed = Color.parseColor("#FF4081");
+ customTheme.unsubscribed = Color.parseColor("#1565C0");
+ customTheme.username = Color.parseColor("#1E88E5");
+ customTheme.subreddit = Color.parseColor("#E91E63");
+ customTheme.authorFlairTextColor = Color.parseColor("#EE02C4");
+ customTheme.submitter = Color.parseColor("#EE8A02");
+ customTheme.moderator = Color.parseColor("#00BA81");
+ customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77");
+ customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77");
+ customTheme.dividerColor = Color.parseColor("#69666C");
+ customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#424242");
+ customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C");
+ customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0");
+ customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3");
+ customTheme.commentVerticalBarColor3 = Color.parseColor("#00B8DA");
+ customTheme.commentVerticalBarColor4 = Color.parseColor("#EDCA00");
+ customTheme.commentVerticalBarColor5 = Color.parseColor("#EE0219");
+ customTheme.commentVerticalBarColor6 = Color.parseColor("#00B925");
+ customTheme.commentVerticalBarColor7 = Color.parseColor("#EE4602");
+ customTheme.fabIconColor = Color.parseColor("#FFFFFF");
+ customTheme.chipTextColor = Color.parseColor("#FFFFFF");
+ customTheme.navBarColor = Color.parseColor("#121212");
+ customTheme.isLightStatusBar = false;
+ customTheme.isLightNavBar = false;
+ customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = false;
+
+ return customTheme;
+ }
+
+ public static CustomTheme getIndigoAmoled(Context context) {
+ CustomTheme customTheme = new CustomTheme(context.getString(R.string.theme_name_indigo_dark));
+ customTheme.isLightTheme = false;
+ customTheme.isDarkTheme = true;
+ customTheme.isAmoledTheme = false;
+ customTheme.colorPrimary = Color.parseColor("#000000");
+ customTheme.colorPrimaryDark = Color.parseColor("#000000");
+ customTheme.colorAccent = Color.parseColor("#FF4081");
+ customTheme.colorPrimaryLightTheme = Color.parseColor("#1565C0");
+ customTheme.primaryTextColor = Color.parseColor("#FFFFFF");
+ customTheme.secondaryTextColor = Color.parseColor("#B3FFFFFF");
+ customTheme.postTitleColor = Color.parseColor("#FFFFFF");
+ customTheme.postContentColor = Color.parseColor("#B3FFFFFF");
+ customTheme.commentColor = Color.parseColor("#FFFFFF");
+ customTheme.buttonTextColor = Color.parseColor("#FFFFFF");
+ customTheme.backgroundColor = Color.parseColor("#000000");
+ customTheme.cardViewBackgroundColor = Color.parseColor("#000000");
+ customTheme.commentBackgroundColor = Color.parseColor("#000000");
+ customTheme.bottomAppBarBackgroundColor = Color.parseColor("#000000");
+ customTheme.primaryIconColor = Color.parseColor("#FFFFFF");
+ customTheme.postIconAndInfoColor = Color.parseColor("#B3FFFFFF");
+ customTheme.commentIconAndInfoColor = Color.parseColor("#B3FFFFFF");
+ customTheme.toolbarPrimaryTextAndIconColor = Color.parseColor("#FFFFFF");
+ customTheme.toolbarSecondaryTextColor = Color.parseColor("#FFFFFF");
+ customTheme.circularProgressBarBackground = Color.parseColor("#000000");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabBackground = Color.parseColor("#000000");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTextColor = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithExpandedCollapsingToolbarTabIndicator = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabBackground = Color.parseColor("#000000");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTextColor = Color.parseColor("#FFFFFF");
+ customTheme.tabLayoutWithCollapsedCollapsingToolbarTabIndicator = Color.parseColor("#FFFFFF");
+ customTheme.upvoted = Color.parseColor("#E91E63");
+ customTheme.downvoted = Color.parseColor("#007DDE");
+ customTheme.postTypeBackgroundColor = Color.parseColor("#1565C0");
+ customTheme.postTypeTextColor = Color.parseColor("#FFFFFF");
+ customTheme.spoilerBackgroundColor = Color.parseColor("#EE02EB");
+ customTheme.spoilerTextColor = Color.parseColor("#FFFFFF");
+ customTheme.nsfwBackgroundColor = Color.parseColor("#FF4081");
+ customTheme.nsfwTextColor = Color.parseColor("#FFFFFF");
+ customTheme.flairBackgroundColor = Color.parseColor("#00AA8C");
+ customTheme.flairTextColor = Color.parseColor("#FFFFFF");
+ customTheme.archivedTint = Color.parseColor("#B4009F");
+ customTheme.lockedIconTint = Color.parseColor("#EE7302");
+ customTheme.crosspostIconTint = Color.parseColor("#FF4081");
+ customTheme.stickiedPostIconTint = Color.parseColor("#1565C0");
+ customTheme.subscribed = Color.parseColor("#FF4081");
+ customTheme.unsubscribed = Color.parseColor("#1565C0");
+ customTheme.username = Color.parseColor("#1E88E5");
+ customTheme.subreddit = Color.parseColor("#E91E63");
+ customTheme.authorFlairTextColor = Color.parseColor("#EE02C4");
+ customTheme.submitter = Color.parseColor("#EE8A02");
+ customTheme.moderator = Color.parseColor("#00BA81");
+ customTheme.singleCommentThreadBackgroundColor = Color.parseColor("#123E77");
+ customTheme.unreadMessageBackgroundColor = Color.parseColor("#123E77");
+ customTheme.dividerColor = Color.parseColor("#69666C");
+ customTheme.noPreviewLinkBackgroundColor = Color.parseColor("#424242");
+ customTheme.voteAndReplyUnavailableButtonColor = Color.parseColor("#3C3C3C");
+ customTheme.commentVerticalBarColor1 = Color.parseColor("#1565C0");
+ customTheme.commentVerticalBarColor2 = Color.parseColor("#C300B3");
+ customTheme.commentVerticalBarColor3 = Color.parseColor("#00B8DA");
+ customTheme.commentVerticalBarColor4 = Color.parseColor("#EDCA00");
+ customTheme.commentVerticalBarColor5 = Color.parseColor("#EE0219");
+ customTheme.commentVerticalBarColor6 = Color.parseColor("#00B925");
+ customTheme.commentVerticalBarColor7 = Color.parseColor("#EE4602");
+ customTheme.fabIconColor = Color.parseColor("#FFFFFF");
+ customTheme.chipTextColor = Color.parseColor("#FFFFFF");
+ customTheme.navBarColor = Color.parseColor("#000000");
+ customTheme.isLightStatusBar = false;
+ customTheme.isLightNavBar = false;
+ customTheme.isChangeStatusBarIconColorAfterToolbarCollapsedInImmersiveInterface = false;
+
+ return customTheme;
}
}
diff --git a/app/src/main/res/layout/activity_custom_theme_listing.xml b/app/src/main/res/layout/activity_custom_theme_listing.xml
new file mode 100644
index 00000000..f128c11c
--- /dev/null
+++ b/app/src/main/res/layout/activity_custom_theme_listing.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_custom_theme.xml b/app/src/main/res/layout/item_custom_theme.xml
new file mode 100644
index 00000000..1aba3472
--- /dev/null
+++ b/app/src/main/res/layout/item_custom_theme.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_custom_theme_color_item.xml b/app/src/main/res/layout/item_custom_theme_color_item.xml
new file mode 100644
index 00000000..9a56b98b
--- /dev/null
+++ b/app/src/main/res/layout/item_custom_theme_color_item.xml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_custom_theme_switch_item.xml b/app/src/main/res/layout/item_custom_theme_switch_item.xml
new file mode 100644
index 00000000..18e3aed2
--- /dev/null
+++ b/app/src/main/res/layout/item_custom_theme_switch_item.xml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_theme_color_item.xml b/app/src/main/res/layout/item_theme_color_item.xml
deleted file mode 100644
index 6adc2d29..00000000
--- a/app/src/main/res/layout/item_theme_color_item.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/item_theme_switch_item.xml b/app/src/main/res/layout/item_theme_switch_item.xml
deleted file mode 100644
index 4b337fc8..00000000
--- a/app/src/main/res/layout/item_theme_switch_item.xml
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 158495c7..c32eac17 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -598,4 +598,8 @@
Only available for Android 8.0 or above.
Only available for Android 6.0 or above.
+ Indigo
+ Indigo Dark
+ Indigo Amoled
+