Still prepare to add different themes.

This commit is contained in:
Alex Ning 2020-02-27 16:58:15 +08:00
parent 0f36ad4e1d
commit e1ce1af47a
74 changed files with 488 additions and 371 deletions

View File

@ -34,7 +34,7 @@ public abstract class BaseActivity extends AppCompatActivity {
switch (themeType) { switch (themeType) {
case 0: case 0:
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO); AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO);
getTheme().applyStyle(R.style.Theme_Default, true); getTheme().applyStyle(R.style.Theme_Purple, true);
break; break;
case 1: case 1:
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_YES); AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_YES);
@ -51,7 +51,7 @@ public abstract class BaseActivity extends AppCompatActivity {
AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_AUTO_BATTERY); AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_AUTO_BATTERY);
} }
if((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_NO) { if((getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) == Configuration.UI_MODE_NIGHT_NO) {
getTheme().applyStyle(R.style.Theme_Default, true); getTheme().applyStyle(R.style.Theme_Purple, true);
} else { } else {
if(mSharedPreferences.getBoolean(SharedPreferencesUtils.AMOLED_DARK_KEY, false)) { if(mSharedPreferences.getBoolean(SharedPreferencesUtils.AMOLED_DARK_KEY, false)) {
getTheme().applyStyle(R.style.Theme_Default_AmoledDark, true); getTheme().applyStyle(R.style.Theme_Default_AmoledDark, true);

View File

@ -20,7 +20,6 @@ import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout; import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -53,6 +52,7 @@ import ml.docilealligator.infinityforreddit.Infinity;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SendComment; import ml.docilealligator.infinityforreddit.SendComment;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
public class CommentActivity extends BaseActivity { public class CommentActivity extends BaseActivity {
@ -146,7 +146,7 @@ public class CommentActivity extends BaseActivity {
if (parentBody != null && !parentBody.equals("")) { if (parentBody != null && !parentBody.equals("")) {
contentMarkdownRecyclerView.setVisibility(View.VISIBLE); contentMarkdownRecyclerView.setVisibility(View.VISIBLE);
contentMarkdownRecyclerView.setNestedScrollingEnabled(false); contentMarkdownRecyclerView.setNestedScrollingEnabled(false);
int markdownColor = ContextCompat.getColor(this, R.color.defaultTextColor); int markdownColor = Utils.getAttributeColor(this, R.attr.secondaryTextColor);
Markwon postBodyMarkwon = Markwon.builder(this) Markwon postBodyMarkwon = Markwon.builder(this)
.usePlugin(new AbstractMarkwonPlugin() { .usePlugin(new AbstractMarkwonPlugin() {
@Override @Override

View File

@ -22,6 +22,7 @@ import javax.inject.Inject;
import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.Infinity;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY; import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_AUTO_BATTERY;
import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM; import static androidx.appcompat.app.AppCompatDelegate.MODE_NIGHT_FOLLOW_SYSTEM;
@ -234,7 +235,7 @@ public class LinkResolverActivity extends AppCompatActivity {
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
// add share action to menu list // add share action to menu list
builder.addDefaultShareMenuItem(); builder.addDefaultShareMenuItem();
builder.setToolbarColor(getResources().getColor(R.color.colorPrimary)); builder.setToolbarColor(Utils.getAttributeColor(this, R.attr.colorPrimary));
CustomTabsIntent customTabsIntent = builder.build(); CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.intent.setPackage(resolveInfos.get(0).activityInfo.packageName); customTabsIntent.intent.setPackage(resolveInfos.get(0).activityInfo.packageName);
if (uri.getScheme() == null) { if (uri.getScheme() == null) {

View File

@ -6,7 +6,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -47,6 +46,7 @@ import ml.docilealligator.infinityforreddit.MultiReddit.MultiRedditViewModel;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
public class MultiRedditListingActivity extends BaseActivity { public class MultiRedditListingActivity extends BaseActivity {
@ -147,11 +147,8 @@ public class MultiRedditListingActivity extends BaseActivity {
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
mSwipeRefreshLayout.setOnRefreshListener(this::loadMultiReddits); mSwipeRefreshLayout.setOnRefreshListener(this::loadMultiReddits);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent));
getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
if (savedInstanceState != null) { if (savedInstanceState != null) {
mInsertSuccess = savedInstanceState.getBoolean(INSERT_MULTI_REDDIT_STATE); mInsertSuccess = savedInstanceState.getBoolean(INSERT_MULTI_REDDIT_STATE);

View File

@ -130,6 +130,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
private boolean loadSubredditIconSuccessful = true; private boolean loadSubredditIconSuccessful = true;
private boolean isPosting; private boolean isPosting;
private Uri imageUri; private Uri imageUri;
private int primaryTextColor;
private int flairColor; private int flairColor;
private int spoilerColor; private int spoilerColor;
private int nsfwColor; private int nsfwColor;
@ -161,6 +162,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE);
primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor);
flairColor = Utils.getAttributeColor(this, R.attr.flairColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor);
spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor);
nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor);
@ -192,7 +194,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
} }
if (subredditName != null) { if (subredditName != null) {
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
flairTextView.setVisibility(View.VISIBLE); flairTextView.setVisibility(View.VISIBLE);
if (!loadSubredditIconSuccessful) { if (!loadSubredditIconSuccessful) {
@ -224,7 +226,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
loadSubredditIconSuccessful = false; loadSubredditIconSuccessful = false;
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME);
subredditSelected = true; subredditSelected = true;
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
loadSubredditIcon(); loadSubredditIcon();
} else { } else {
@ -507,7 +509,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
subredditSelected = true; subredditSelected = true;
subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER); subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER);
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
displaySubredditIcon(); displaySubredditIcon();

View File

@ -104,6 +104,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
private boolean subredditIsUser; private boolean subredditIsUser;
private boolean loadSubredditIconSuccessful = true; private boolean loadSubredditIconSuccessful = true;
private boolean isPosting; private boolean isPosting;
private int primaryTextColor;
private int flairColor; private int flairColor;
private int spoilerColor; private int spoilerColor;
private int nsfwColor; private int nsfwColor;
@ -135,6 +136,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE);
primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor);
flairColor = Utils.getAttributeColor(this, R.attr.flairColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor);
spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor);
nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor);
@ -160,7 +162,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
isNSFW = savedInstanceState.getBoolean(IS_NSFW_STATE); isNSFW = savedInstanceState.getBoolean(IS_NSFW_STATE);
if (subredditName != null) { if (subredditName != null) {
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
flairTextView.setVisibility(View.VISIBLE); flairTextView.setVisibility(View.VISIBLE);
if (!loadSubredditIconSuccessful) { if (!loadSubredditIconSuccessful) {
@ -192,7 +194,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
loadSubredditIconSuccessful = false; loadSubredditIconSuccessful = false;
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME);
subredditSelected = true; subredditSelected = true;
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
flairTextView.setVisibility(View.VISIBLE); flairTextView.setVisibility(View.VISIBLE);
loadSubredditIcon(); loadSubredditIcon();
@ -427,7 +429,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
subredditSelected = true; subredditSelected = true;
subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER); subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER);
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
displaySubredditIcon(); displaySubredditIcon();

View File

@ -104,6 +104,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
private boolean subredditIsUser; private boolean subredditIsUser;
private boolean loadSubredditIconSuccessful = true; private boolean loadSubredditIconSuccessful = true;
private boolean isPosting; private boolean isPosting;
private int primaryTextColor;
private int flairColor; private int flairColor;
private int spoilerColor; private int spoilerColor;
private int nsfwColor; private int nsfwColor;
@ -135,6 +136,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE);
primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor);
flairColor = Utils.getAttributeColor(this, R.attr.flairColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor);
spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor);
nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor);
@ -160,7 +162,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
isNSFW = savedInstanceState.getBoolean(IS_NSFW_STATE); isNSFW = savedInstanceState.getBoolean(IS_NSFW_STATE);
if (subredditName != null) { if (subredditName != null) {
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
flairTextView.setVisibility(View.VISIBLE); flairTextView.setVisibility(View.VISIBLE);
if (!loadSubredditIconSuccessful) { if (!loadSubredditIconSuccessful) {
@ -192,7 +194,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
loadSubredditIconSuccessful = false; loadSubredditIconSuccessful = false;
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME);
subredditSelected = true; subredditSelected = true;
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
flairTextView.setVisibility(View.VISIBLE); flairTextView.setVisibility(View.VISIBLE);
loadSubredditIcon(); loadSubredditIcon();
@ -427,7 +429,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
subredditSelected = true; subredditSelected = true;
subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER); subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER);
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
displaySubredditIcon(); displaySubredditIcon();

View File

@ -136,6 +136,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
private boolean loadSubredditIconSuccessful = true; private boolean loadSubredditIconSuccessful = true;
private boolean isPosting; private boolean isPosting;
private boolean wasPlaying; private boolean wasPlaying;
private int primaryTextColor;
private int flairColor; private int flairColor;
private int spoilerColor; private int spoilerColor;
private int nsfwColor; private int nsfwColor;
@ -175,6 +176,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE);
primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor);
flairColor = Utils.getAttributeColor(this, R.attr.flairColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor);
spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor);
nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor);
@ -205,7 +207,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
} }
if (subredditName != null) { if (subredditName != null) {
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
flairTextView.setVisibility(View.VISIBLE); flairTextView.setVisibility(View.VISIBLE);
if (!loadSubredditIconSuccessful) { if (!loadSubredditIconSuccessful) {
@ -237,7 +239,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
loadSubredditIconSuccessful = false; loadSubredditIconSuccessful = false;
subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME);
subredditSelected = true; subredditSelected = true;
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
loadSubredditIcon(); loadSubredditIcon();
} else { } else {
@ -528,7 +530,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
subredditSelected = true; subredditSelected = true;
subredditIsUser = data.getBooleanExtra(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER, false); subredditIsUser = data.getBooleanExtra(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER, false);
subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); subredditNameTextView.setTextColor(primaryTextColor);
subredditNameTextView.setText(subredditName); subredditNameTextView.setText(subredditName);
displaySubredditIcon(); displaySubredditIcon();

View File

@ -5,7 +5,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
import android.view.View; import android.view.View;
@ -50,6 +49,7 @@ import ml.docilealligator.infinityforreddit.NetworkState;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
public class ViewMessageActivity extends BaseActivity { public class ViewMessageActivity extends BaseActivity {
@ -255,11 +255,8 @@ public class ViewMessageActivity extends BaseActivity {
}); });
mSwipeRefreshLayout.setOnRefreshListener(this::onRefresh); mSwipeRefreshLayout.setOnRefreshListener(this::onRefresh);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent));
getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
} }
private void showErrorView(int stringResId) { private void showErrorView(int stringResId) {

View File

@ -6,7 +6,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.Menu; import android.view.Menu;
import android.view.MenuItem; import android.view.MenuItem;
@ -82,6 +81,7 @@ import ml.docilealligator.infinityforreddit.SortType;
import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback; import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback;
import ml.docilealligator.infinityforreddit.Utils.RedditUtils; import ml.docilealligator.infinityforreddit.Utils.RedditUtils;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Call; import retrofit2.Call;
import retrofit2.Callback; import retrofit2.Callback;
import retrofit2.Response; import retrofit2.Response;
@ -353,11 +353,8 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS
} }
mSwipeRefreshLayout.setOnRefreshListener(() -> refresh(true, true)); mSwipeRefreshLayout.setOnRefreshListener(() -> refresh(true, true));
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent));
getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
mSmoothScroller = new LinearSmoothScroller(this) { mSmoothScroller = new LinearSmoothScroller(this) {
@Override @Override

View File

@ -22,7 +22,6 @@ import android.widget.Toast;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.appcompat.widget.Toolbar; import androidx.appcompat.widget.Toolbar;
import androidx.core.content.ContextCompat;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -56,6 +55,7 @@ import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditData; import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditData;
import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditViewModel; import ml.docilealligator.infinityforreddit.SubredditDatabase.SubredditViewModel;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
public class ViewSidebarActivity extends BaseActivity { public class ViewSidebarActivity extends BaseActivity {
@ -66,7 +66,7 @@ public class ViewSidebarActivity extends BaseActivity {
@BindView(R.id.toolbar_view_sidebar_activity) @BindView(R.id.toolbar_view_sidebar_activity)
Toolbar toolbar; Toolbar toolbar;
@BindView(R.id.swipe_refresh_layout_view_sidebar_activity) @BindView(R.id.swipe_refresh_layout_view_sidebar_activity)
SwipeRefreshLayout swipeRefreshLayout; SwipeRefreshLayout mSwipeRefreshLayout;
@BindView(R.id.markdown_recycler_view_view_sidebar_activity) @BindView(R.id.markdown_recycler_view_view_sidebar_activity)
RecyclerView markdownRecyclerView; RecyclerView markdownRecyclerView;
@Inject @Inject
@ -151,7 +151,7 @@ public class ViewSidebarActivity extends BaseActivity {
setSupportActionBar(toolbar); setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true);
int markdownColor = ContextCompat.getColor(this, R.color.defaultTextColor); int markdownColor = Utils.getAttributeColor(this, R.attr.secondaryTextColor);
Markwon markwon = Markwon.builder(this) Markwon markwon = Markwon.builder(this)
.usePlugin(new AbstractMarkwonPlugin() { .usePlugin(new AbstractMarkwonPlugin() {
@Override @Override
@ -204,25 +204,23 @@ public class ViewSidebarActivity extends BaseActivity {
} }
}); });
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setOnRefreshListener(this::fetchSubredditData);
getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor));
swipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent));
swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
swipeRefreshLayout.setOnRefreshListener(this::fetchSubredditData);
} }
private void fetchSubredditData() { private void fetchSubredditData() {
swipeRefreshLayout.setRefreshing(true); mSwipeRefreshLayout.setRefreshing(true);
FetchSubredditData.fetchSubredditData(mRetrofit, subredditName, new FetchSubredditData.FetchSubredditDataListener() { FetchSubredditData.fetchSubredditData(mRetrofit, subredditName, new FetchSubredditData.FetchSubredditDataListener() {
@Override @Override
public void onFetchSubredditDataSuccess(SubredditData subredditData, int nCurrentOnlineSubscribers) { public void onFetchSubredditDataSuccess(SubredditData subredditData, int nCurrentOnlineSubscribers) {
swipeRefreshLayout.setRefreshing(false); mSwipeRefreshLayout.setRefreshing(false);
new InsertSubredditDataAsyncTask(mRedditDataRoomDatabase, subredditData, () -> swipeRefreshLayout.setRefreshing(false)).execute(); new InsertSubredditDataAsyncTask(mRedditDataRoomDatabase, subredditData, () -> mSwipeRefreshLayout.setRefreshing(false)).execute();
} }
@Override @Override
public void onFetchSubredditDataFail() { public void onFetchSubredditDataFail() {
swipeRefreshLayout.setRefreshing(false); mSwipeRefreshLayout.setRefreshing(false);
Toast.makeText(ViewSidebarActivity.this, R.string.cannot_fetch_sidebar, Toast.LENGTH_SHORT).show(); Toast.makeText(ViewSidebarActivity.this, R.string.cannot_fetch_sidebar, Toast.LENGTH_SHORT).show();
} }
}); });
@ -240,7 +238,7 @@ public class ViewSidebarActivity extends BaseActivity {
finish(); finish();
return true; return true;
} else if (item.getItemId() == R.id.action_refresh_view_sidebar_activity) { } else if (item.getItemId() == R.id.action_refresh_view_sidebar_activity) {
if (!swipeRefreshLayout.isRefreshing()) { if (!mSwipeRefreshLayout.isRefreshing()) {
fetchSubredditData(); fetchSubredditData();
} }
return true; return true;

View File

@ -26,7 +26,6 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet; import androidx.constraintlayout.widget.ConstraintSet;
import androidx.core.content.ContextCompat;
import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -129,12 +128,22 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
private boolean isInitiallyLoadingFailed; private boolean isInitiallyLoadingFailed;
private boolean mHasMoreComments; private boolean mHasMoreComments;
private boolean loadMoreCommentsFailed; private boolean loadMoreCommentsFailed;
private int mSecondaryTextColor;
private int mCommentBackgroundColor; private int mCommentBackgroundColor;
private int mUsernameColor; private int mUsernameColor;
private int mSubmitterColor; private int mSubmitterColor;
private int mModeratorColor; private int mModeratorColor;
private int mUpvotedColor; private int mUpvotedColor;
private int mDownvotedColor; private int mDownvotedColor;
private int mCommentVerticalBarColor1;
private int mCommentVerticalBarColor2;
private int mCommentVerticalBarColor3;
private int mCommentVerticalBarColor4;
private int mCommentVerticalBarColor5;
private int mCommentVerticalBarColor6;
private int mCommentVerticalBarColor7;
private int mSingleCommentThreadBackgroundColor;
private int mVoteAndReplyUnavailableVoteButtonColor;
private float mScale; private float mScale;
private ShareLinkBottomSheetFragment mShareLinkBottomSheetFragment; private ShareLinkBottomSheetFragment mShareLinkBottomSheetFragment;
@ -153,7 +162,8 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
mOauthRetrofit = oauthRetrofit; mOauthRetrofit = oauthRetrofit;
mRedditDataRoomDatabase = redditDataRoomDatabase; mRedditDataRoomDatabase = redditDataRoomDatabase;
mGlide = glide; mGlide = glide;
int markdownColor = ContextCompat.getColor(activity, R.color.defaultTextColor); mSecondaryTextColor = Utils.getAttributeColor(activity, R.attr.secondaryTextColor);
int markdownColor = mSecondaryTextColor;
mPostDetailMarkwon = Markwon.builder(mActivity) mPostDetailMarkwon = Markwon.builder(mActivity)
.usePlugin(new AbstractMarkwonPlugin() { .usePlugin(new AbstractMarkwonPlugin() {
@Override @Override
@ -250,6 +260,15 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
mUsernameColor = Utils.getAttributeColor(activity, R.attr.username); mUsernameColor = Utils.getAttributeColor(activity, R.attr.username);
mUpvotedColor = Utils.getAttributeColor(activity, R.attr.upvoted); mUpvotedColor = Utils.getAttributeColor(activity, R.attr.upvoted);
mDownvotedColor = Utils.getAttributeColor(activity, R.attr.downvoted); mDownvotedColor = Utils.getAttributeColor(activity, R.attr.downvoted);
mCommentVerticalBarColor1 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor1);
mCommentVerticalBarColor2 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor2);
mCommentVerticalBarColor3 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor3);
mCommentVerticalBarColor4 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor4);
mCommentVerticalBarColor5 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor5);
mCommentVerticalBarColor6 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor6);
mCommentVerticalBarColor7 = Utils.getAttributeColor(activity, R.attr.commentVerticalBarColor7);
mSingleCommentThreadBackgroundColor = Utils.getAttributeColor(activity, R.attr.singleCommentThreadBackgroundColor);
mVoteAndReplyUnavailableVoteButtonColor = Utils.getAttributeColor(activity, R.attr.voteAndReplyUnavailableVoteButtonColor);
mShareLinkBottomSheetFragment = new ShareLinkBottomSheetFragment(); mShareLinkBottomSheetFragment = new ShareLinkBottomSheetFragment();
mCopyTextBottomSheetFragment = new CopyTextBottomSheetFragment(); mCopyTextBottomSheetFragment = new CopyTextBottomSheetFragment();
@ -418,7 +437,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
case 0: case 0:
((PostDetailViewHolder) holder).mUpvoteButton.clearColorFilter(); ((PostDetailViewHolder) holder).mUpvoteButton.clearColorFilter();
((PostDetailViewHolder) holder).mDownvoteButton.clearColorFilter(); ((PostDetailViewHolder) holder).mDownvoteButton.clearColorFilter();
((PostDetailViewHolder) holder).mScoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostDetailViewHolder) holder).mScoreTextView.setTextColor(mSecondaryTextColor);
} }
if (mPost.getPostType() != Post.TEXT_TYPE && mPost.getPostType() != Post.NO_PREVIEW_LINK_TYPE) { if (mPost.getPostType() != Post.TEXT_TYPE && mPost.getPostType() != Post.NO_PREVIEW_LINK_TYPE) {
@ -433,9 +452,9 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
if (mPost.isArchived()) { if (mPost.isArchived()) {
((PostDetailViewHolder) holder).mUpvoteButton ((PostDetailViewHolder) holder).mUpvoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), android.graphics.PorterDuff.Mode.SRC_IN); .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor, android.graphics.PorterDuff.Mode.SRC_IN);
((PostDetailViewHolder) holder).mDownvoteButton ((PostDetailViewHolder) holder).mDownvoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), android.graphics.PorterDuff.Mode.SRC_IN); .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor, android.graphics.PorterDuff.Mode.SRC_IN);
} }
if (mPost.isCrosspost()) { if (mPost.isCrosspost()) {
@ -719,8 +738,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
} }
if (mIsSingleCommentThreadMode && comment.getId().equals(mSingleCommentId)) { if (mIsSingleCommentThreadMode && comment.getId().equals(mSingleCommentId)) {
((CommentViewHolder) holder).itemView.setBackgroundColor( ((CommentViewHolder) holder).itemView.setBackgroundColor(mSingleCommentThreadBackgroundColor);
mActivity.getResources().getColor(R.color.singleCommentThreadBackgroundColor));
} }
String authorPrefixed = "u/" + comment.getAuthor(); String authorPrefixed = "u/" + comment.getAuthor();
@ -769,31 +787,31 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
switch (comment.getDepth() % 7) { switch (comment.getDepth() % 7) {
case 0: case 0:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar7)); .setBackgroundColor(mCommentVerticalBarColor7);
break; break;
case 1: case 1:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar1)); .setBackgroundColor(mCommentVerticalBarColor1);
break; break;
case 2: case 2:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar2)); .setBackgroundColor(mCommentVerticalBarColor2);
break; break;
case 3: case 3:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar3)); .setBackgroundColor(mCommentVerticalBarColor3);
break; break;
case 4: case 4:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar4)); .setBackgroundColor(mCommentVerticalBarColor4);
break; break;
case 5: case 5:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar5)); .setBackgroundColor(mCommentVerticalBarColor5);
break; break;
case 6: case 6:
((CommentViewHolder) holder).verticalBlock ((CommentViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar6)); .setBackgroundColor(mCommentVerticalBarColor6);
break; break;
} }
ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams(); ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams();
@ -841,19 +859,19 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
if (mPost.isArchived()) { if (mPost.isArchived()) {
((CommentViewHolder) holder).replyButton ((CommentViewHolder) holder).replyButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor,
android.graphics.PorterDuff.Mode.SRC_IN); android.graphics.PorterDuff.Mode.SRC_IN);
((CommentViewHolder) holder).upVoteButton ((CommentViewHolder) holder).upVoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor,
android.graphics.PorterDuff.Mode.SRC_IN); android.graphics.PorterDuff.Mode.SRC_IN);
((CommentViewHolder) holder).downVoteButton ((CommentViewHolder) holder).downVoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor,
android.graphics.PorterDuff.Mode.SRC_IN); android.graphics.PorterDuff.Mode.SRC_IN);
} }
if (mPost.isLocked()) { if (mPost.isLocked()) {
((CommentViewHolder) holder).replyButton ((CommentViewHolder) holder).replyButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor,
android.graphics.PorterDuff.Mode.SRC_IN); android.graphics.PorterDuff.Mode.SRC_IN);
} }
@ -911,7 +929,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((CommentViewHolder) holder).upVoteButton.clearColorFilter(); ((CommentViewHolder) holder).upVoteButton.clearColorFilter();
((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((CommentViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, ((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
@ -927,7 +945,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
} else { } else {
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
((CommentViewHolder) holder).upVoteButton.clearColorFilter(); ((CommentViewHolder) holder).upVoteButton.clearColorFilter();
((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((CommentViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((CommentViewHolder) holder).downVoteButton.clearColorFilter(); ((CommentViewHolder) holder).downVoteButton.clearColorFilter();
@ -968,7 +986,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((CommentViewHolder) holder).downVoteButton.clearColorFilter(); ((CommentViewHolder) holder).downVoteButton.clearColorFilter();
((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((CommentViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, ((CommentViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
@ -984,7 +1002,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
} else { } else {
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
((CommentViewHolder) holder).downVoteButton.clearColorFilter(); ((CommentViewHolder) holder).downVoteButton.clearColorFilter();
((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((CommentViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((CommentViewHolder) holder).upVoteButton.clearColorFilter(); ((CommentViewHolder) holder).upVoteButton.clearColorFilter();
@ -1092,31 +1110,31 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
switch (placeholder.getDepth() % 7) { switch (placeholder.getDepth() % 7) {
case 0: case 0:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar7)); .setBackgroundColor(mCommentVerticalBarColor7);
break; break;
case 1: case 1:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar1)); .setBackgroundColor(mCommentVerticalBarColor1);
break; break;
case 2: case 2:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar2)); .setBackgroundColor(mCommentVerticalBarColor2);
break; break;
case 3: case 3:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar3)); .setBackgroundColor(mCommentVerticalBarColor3);
break; break;
case 4: case 4:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar4)); .setBackgroundColor(mCommentVerticalBarColor4);
break; break;
case 5: case 5:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar5)); .setBackgroundColor(mCommentVerticalBarColor5);
break; break;
case 6: case 6:
((LoadMoreChildCommentsViewHolder) holder).verticalBlock ((LoadMoreChildCommentsViewHolder) holder).verticalBlock
.setBackgroundColor(ContextCompat.getColor(mActivity, R.color.commentVerticalBar6)); .setBackgroundColor(mCommentVerticalBarColor6);
break; break;
} }
@ -1615,7 +1633,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
((CommentViewHolder) holder).authorTypeImageView.setVisibility(View.GONE); ((CommentViewHolder) holder).authorTypeImageView.setVisibility(View.GONE);
((CommentViewHolder) holder).expandButton.setVisibility(View.GONE); ((CommentViewHolder) holder).expandButton.setVisibility(View.GONE);
((CommentViewHolder) holder).upVoteButton.clearColorFilter(); ((CommentViewHolder) holder).upVoteButton.clearColorFilter();
((CommentViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((CommentViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
((CommentViewHolder) holder).downVoteButton.clearColorFilter(); ((CommentViewHolder) holder).downVoteButton.clearColorFilter();
((CommentViewHolder) holder).replyButton.clearColorFilter(); ((CommentViewHolder) holder).replyButton.clearColorFilter();
ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams(); ViewGroup.LayoutParams params = ((CommentViewHolder) holder).verticalBlock.getLayoutParams();
@ -1625,7 +1643,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
((CommentViewHolder) holder).itemView.setBackgroundColor(mCommentBackgroundColor); ((CommentViewHolder) holder).itemView.setBackgroundColor(mCommentBackgroundColor);
} else if (holder instanceof PostDetailViewHolder) { } else if (holder instanceof PostDetailViewHolder) {
((PostDetailViewHolder) holder).mUpvoteButton.clearColorFilter(); ((PostDetailViewHolder) holder).mUpvoteButton.clearColorFilter();
((PostDetailViewHolder) holder).mScoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostDetailViewHolder) holder).mScoreTextView.setTextColor(mSecondaryTextColor);
((PostDetailViewHolder) holder).mDownvoteButton.clearColorFilter(); ((PostDetailViewHolder) holder).mDownvoteButton.clearColorFilter();
((PostDetailViewHolder) holder).flairTextView.setVisibility(View.GONE); ((PostDetailViewHolder) holder).flairTextView.setVisibility(View.GONE);
((PostDetailViewHolder) holder).spoilerTextView.setVisibility(View.GONE); ((PostDetailViewHolder) holder).spoilerTextView.setVisibility(View.GONE);
@ -1804,7 +1822,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
mPost.setVoteType(0); mPost.setVoteType(0);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
mUpvoteButton.clearColorFilter(); mUpvoteButton.clearColorFilter();
mScoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); mScoreTextView.setTextColor(mSecondaryTextColor);
} }
mScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, mScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
@ -1822,7 +1840,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
} else { } else {
mPost.setVoteType(0); mPost.setVoteType(0);
mUpvoteButton.clearColorFilter(); mUpvoteButton.clearColorFilter();
mScoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); mScoreTextView.setTextColor(mSecondaryTextColor);
} }
mDownvoteButton.clearColorFilter(); mDownvoteButton.clearColorFilter();
@ -1878,7 +1896,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
mPost.setVoteType(0); mPost.setVoteType(0);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
mDownvoteButton.clearColorFilter(); mDownvoteButton.clearColorFilter();
mScoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); mScoreTextView.setTextColor(mSecondaryTextColor);
} }
mScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, mScoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
@ -1896,7 +1914,7 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter<Recy
} else { } else {
mPost.setVoteType(0); mPost.setVoteType(0);
mDownvoteButton.clearColorFilter(); mDownvoteButton.clearColorFilter();
mScoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); mScoreTextView.setTextColor(mSecondaryTextColor);
} }
mUpvoteButton.clearColorFilter(); mUpvoteButton.clearColorFilter();

View File

@ -19,7 +19,6 @@ import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet; import androidx.constraintlayout.widget.ConstraintSet;
import androidx.core.content.ContextCompat;
import androidx.paging.PagedListAdapter; import androidx.paging.PagedListAdapter;
import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -66,6 +65,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
private Markwon mMarkwon; private Markwon mMarkwon;
private String mAccessToken; private String mAccessToken;
private String mAccountName; private String mAccountName;
private int mSecondaryTextColor;
private int mUsernameColor; private int mUsernameColor;
private int mSubredditColor; private int mSubredditColor;
private int mUpvotedColor; private int mUpvotedColor;
@ -117,6 +117,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
mShowCommentDivider = showCommentDivider; mShowCommentDivider = showCommentDivider;
mShowAbsoluteNumberOfVotes = showAbsoluteNumberOfVotes; mShowAbsoluteNumberOfVotes = showAbsoluteNumberOfVotes;
mRetryLoadingMoreCallback = retryLoadingMoreCallback; mRetryLoadingMoreCallback = retryLoadingMoreCallback;
mSecondaryTextColor = Utils.getAttributeColor(context, R.attr.secondaryTextColor);
mSubredditColor = Utils.getAttributeColor(context, R.attr.subreddit); mSubredditColor = Utils.getAttributeColor(context, R.attr.subreddit);
mUsernameColor = Utils.getAttributeColor(context, R.attr.username); mUsernameColor = Utils.getAttributeColor(context, R.attr.username);
mUpvotedColor = Utils.getAttributeColor(context, R.attr.upvoted); mUpvotedColor = Utils.getAttributeColor(context, R.attr.upvoted);
@ -232,7 +233,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((DataViewHolder) holder).upvoteButton.clearColorFilter(); ((DataViewHolder) holder).upvoteButton.clearColorFilter();
((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.defaultTextColor)); ((DataViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((DataViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, ((DataViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
@ -248,7 +249,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
} else { } else {
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
((DataViewHolder) holder).upvoteButton.clearColorFilter(); ((DataViewHolder) holder).upvoteButton.clearColorFilter();
((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.defaultTextColor)); ((DataViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((DataViewHolder) holder).downvoteButton.clearColorFilter(); ((DataViewHolder) holder).downvoteButton.clearColorFilter();
@ -284,7 +285,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((DataViewHolder) holder).downvoteButton.clearColorFilter(); ((DataViewHolder) holder).downvoteButton.clearColorFilter();
((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.defaultTextColor)); ((DataViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((DataViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, ((DataViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes,
@ -300,7 +301,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
} else { } else {
comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE); comment.setVoteType(CommentData.VOTE_TYPE_NO_VOTE);
((DataViewHolder) holder).downvoteButton.clearColorFilter(); ((DataViewHolder) holder).downvoteButton.clearColorFilter();
((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.defaultTextColor)); ((DataViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((DataViewHolder) holder).upvoteButton.clearColorFilter(); ((DataViewHolder) holder).upvoteButton.clearColorFilter();
@ -380,7 +381,7 @@ public class CommentsListingRecyclerViewAdapter extends PagedListAdapter<Comment
if (holder instanceof DataViewHolder) { if (holder instanceof DataViewHolder) {
((DataViewHolder) holder).upvoteButton.clearColorFilter(); ((DataViewHolder) holder).upvoteButton.clearColorFilter();
((DataViewHolder) holder).downvoteButton.clearColorFilter(); ((DataViewHolder) holder).downvoteButton.clearColorFilter();
((DataViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mContext, R.color.defaultTextColor)); ((DataViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
} }

View File

@ -57,7 +57,9 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
private NetworkState networkState; private NetworkState networkState;
private RetryLoadingMoreCallback mRetryLoadingMoreCallback; private RetryLoadingMoreCallback mRetryLoadingMoreCallback;
private int mMessageBackgroundColor; private int mMessageBackgroundColor;
private int usernameColor; private int mUsernameColor;
private int mPrimaryTextColor;
private int mUnreadMessageBackgroundColor;
public MessageRecyclerViewAdapter(Context context, Retrofit oauthRetrofit, String accessToken, public MessageRecyclerViewAdapter(Context context, Retrofit oauthRetrofit, String accessToken,
RetryLoadingMoreCallback retryLoadingMoreCallback) { RetryLoadingMoreCallback retryLoadingMoreCallback) {
@ -94,7 +96,9 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
mResources = context.getResources(); mResources = context.getResources();
mMessageBackgroundColor = Utils.getAttributeColor(context, R.attr.cardViewBackgroundColor); mMessageBackgroundColor = Utils.getAttributeColor(context, R.attr.cardViewBackgroundColor);
usernameColor = Utils.getAttributeColor(context, R.attr.username); mUsernameColor = Utils.getAttributeColor(context, R.attr.username);
mPrimaryTextColor = Utils.getAttributeColor(context, R.attr.primaryTextColor);
mUnreadMessageBackgroundColor = Utils.getAttributeColor(context, R.attr.unreadMessageBackgroundColor);
} }
@NonNull @NonNull
@ -116,11 +120,11 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
if (message != null) { if (message != null) {
if (message.isNew()) { if (message.isNew()) {
((DataViewHolder) holder).itemView.setBackgroundColor( ((DataViewHolder) holder).itemView.setBackgroundColor(
mResources.getColor(R.color.unreadMessageBackgroundColor)); mUnreadMessageBackgroundColor);
} }
if (message.wasComment()) { if (message.wasComment()) {
((DataViewHolder) holder).authorTextView.setTextColor(usernameColor); ((DataViewHolder) holder).authorTextView.setTextColor(mUsernameColor);
((DataViewHolder) holder).titleTextView.setText(message.getTitle()); ((DataViewHolder) holder).titleTextView.setText(message.getTitle());
} else { } else {
((DataViewHolder) holder).titleTextView.setVisibility(View.GONE); ((DataViewHolder) holder).titleTextView.setVisibility(View.GONE);
@ -152,7 +156,7 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
@Override @Override
public void readFailed() { public void readFailed() {
message.setNew(true); message.setNew(true);
((DataViewHolder) holder).itemView.setBackgroundColor(mResources.getColor(R.color.unreadMessageBackgroundColor)); ((DataViewHolder) holder).itemView.setBackgroundColor(mUnreadMessageBackgroundColor);
} }
}); });
} }
@ -199,7 +203,7 @@ public class MessageRecyclerViewAdapter extends PagedListAdapter<Message, Recycl
if (holder instanceof DataViewHolder) { if (holder instanceof DataViewHolder) {
((DataViewHolder) holder).itemView.setBackgroundColor(mMessageBackgroundColor); ((DataViewHolder) holder).itemView.setBackgroundColor(mMessageBackgroundColor);
((DataViewHolder) holder).titleTextView.setVisibility(View.VISIBLE); ((DataViewHolder) holder).titleTextView.setVisibility(View.VISIBLE);
((DataViewHolder) holder).authorTextView.setTextColor(mResources.getColor(R.color.primaryTextColor)); ((DataViewHolder) holder).authorTextView.setTextColor(mPrimaryTextColor);
} }
} }

View File

@ -21,7 +21,6 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet; import androidx.constraintlayout.widget.ConstraintSet;
import androidx.core.content.ContextCompat;
import androidx.paging.PagedListAdapter; import androidx.paging.PagedListAdapter;
import androidx.recyclerview.widget.DiffUtil; import androidx.recyclerview.widget.DiffUtil;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
@ -98,10 +97,12 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
private boolean canStartActivity = true; private boolean canStartActivity = true;
private int mPostType; private int mPostType;
private int mPostLayout; private int mPostLayout;
private int mSecondaryTextColor;
private int mSubredditColor; private int mSubredditColor;
private int mUsernameColor; private int mUsernameColor;
private int mUpvotedColor; private int mUpvotedColor;
private int mDownvotedColor; private int mDownvotedColor;
private int mVoteAndReplyUnavailableVoteButtonColor;
private float mScale; private float mScale;
private boolean mDisplaySubredditName; private boolean mDisplaySubredditName;
private boolean mVoteButtonsOnTheRight; private boolean mVoteButtonsOnTheRight;
@ -135,10 +136,12 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
mShowDividerInCompactLayout = showDividerInCompactLayout; mShowDividerInCompactLayout = showDividerInCompactLayout;
mShowAbsoluteNumberOfVotes = showAbsoluteNumberOfVotes; mShowAbsoluteNumberOfVotes = showAbsoluteNumberOfVotes;
mPostLayout = postLayout; mPostLayout = postLayout;
mSecondaryTextColor = Utils.getAttributeColor(activity, R.attr.secondaryTextColor);
mSubredditColor = Utils.getAttributeColor(activity, R.attr.subreddit); mSubredditColor = Utils.getAttributeColor(activity, R.attr.subreddit);
mUsernameColor = Utils.getAttributeColor(activity, R.attr.username); mUsernameColor = Utils.getAttributeColor(activity, R.attr.username);
mUpvotedColor = Utils.getAttributeColor(activity, R.attr.upvoted); mUpvotedColor = Utils.getAttributeColor(activity, R.attr.upvoted);
mDownvotedColor = Utils.getAttributeColor(activity, R.attr.downvoted); mDownvotedColor = Utils.getAttributeColor(activity, R.attr.downvoted);
mVoteAndReplyUnavailableVoteButtonColor = Utils.getAttributeColor(activity, R.attr.voteAndReplyUnavailableVoteButtonColor);
mScale = activity.getResources().getDisplayMetrics().density; mScale = activity.getResources().getDisplayMetrics().density;
mGlide = Glide.with(mActivity.getApplicationContext()); mGlide = Glide.with(mActivity.getApplicationContext());
mRedditDataRoomDatabase = redditDataRoomDatabase; mRedditDataRoomDatabase = redditDataRoomDatabase;
@ -427,9 +430,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostViewHolder) holder).archivedImageView.setVisibility(View.VISIBLE); ((PostViewHolder) holder).archivedImageView.setVisibility(View.VISIBLE);
((PostViewHolder) holder).upvoteButton ((PostViewHolder) holder).upvoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), android.graphics.PorterDuff.Mode.SRC_IN); .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor, android.graphics.PorterDuff.Mode.SRC_IN);
((PostViewHolder) holder).downvoteButton ((PostViewHolder) holder).downvoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), android.graphics.PorterDuff.Mode.SRC_IN); .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor, android.graphics.PorterDuff.Mode.SRC_IN);
} }
if (post.isCrosspost()) { if (post.isCrosspost()) {
@ -566,7 +569,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
post.setVoteType(0); post.setVoteType(0);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((PostViewHolder) holder).upvoteButton.clearColorFilter(); ((PostViewHolder) holder).upvoteButton.clearColorFilter();
((PostViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType())); ((PostViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType()));
@ -582,7 +585,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} else { } else {
post.setVoteType(0); post.setVoteType(0);
((PostViewHolder) holder).upvoteButton.clearColorFilter(); ((PostViewHolder) holder).upvoteButton.clearColorFilter();
((PostViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostViewHolder) holder).downvoteButton.clearColorFilter(); ((PostViewHolder) holder).downvoteButton.clearColorFilter();
@ -637,7 +640,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
post.setVoteType(0); post.setVoteType(0);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((PostViewHolder) holder).downvoteButton.clearColorFilter(); ((PostViewHolder) holder).downvoteButton.clearColorFilter();
((PostViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType())); ((PostViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType()));
@ -653,7 +656,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} else { } else {
post.setVoteType(0); post.setVoteType(0);
((PostViewHolder) holder).downvoteButton.clearColorFilter(); ((PostViewHolder) holder).downvoteButton.clearColorFilter();
((PostViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostViewHolder) holder).upvoteButton.clearColorFilter(); ((PostViewHolder) holder).upvoteButton.clearColorFilter();
@ -982,9 +985,9 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostCompactViewHolder) holder).archivedImageView.setVisibility(View.VISIBLE); ((PostCompactViewHolder) holder).archivedImageView.setVisibility(View.VISIBLE);
((PostCompactViewHolder) holder).upvoteButton ((PostCompactViewHolder) holder).upvoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), android.graphics.PorterDuff.Mode.SRC_IN); .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor, android.graphics.PorterDuff.Mode.SRC_IN);
((PostCompactViewHolder) holder).downvoteButton ((PostCompactViewHolder) holder).downvoteButton
.setColorFilter(ContextCompat.getColor(mActivity, R.color.voteAndReplyUnavailableVoteButtonColor), android.graphics.PorterDuff.Mode.SRC_IN); .setColorFilter(mVoteAndReplyUnavailableVoteButtonColor, android.graphics.PorterDuff.Mode.SRC_IN);
} }
if (post.isCrosspost()) { if (post.isCrosspost()) {
@ -1112,7 +1115,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
post.setVoteType(0); post.setVoteType(0);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((PostCompactViewHolder) holder).upvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).upvoteButton.clearColorFilter();
((PostCompactViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostCompactViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostCompactViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType())); ((PostCompactViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType()));
@ -1128,7 +1131,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} else { } else {
post.setVoteType(0); post.setVoteType(0);
((PostCompactViewHolder) holder).upvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).upvoteButton.clearColorFilter();
((PostCompactViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostCompactViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostCompactViewHolder) holder).downvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).downvoteButton.clearColorFilter();
@ -1183,7 +1186,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
post.setVoteType(0); post.setVoteType(0);
newVoteType = RedditUtils.DIR_UNVOTE; newVoteType = RedditUtils.DIR_UNVOTE;
((PostCompactViewHolder) holder).downvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).downvoteButton.clearColorFilter();
((PostCompactViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostCompactViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostCompactViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType())); ((PostCompactViewHolder) holder).scoreTextView.setText(Utils.getNVotes(mShowAbsoluteNumberOfVotes, post.getScore() + post.getVoteType()));
@ -1199,7 +1202,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
} else { } else {
post.setVoteType(0); post.setVoteType(0);
((PostCompactViewHolder) holder).downvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).downvoteButton.clearColorFilter();
((PostCompactViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostCompactViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
} }
((PostCompactViewHolder) holder).upvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).upvoteButton.clearColorFilter();
@ -1463,7 +1466,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE); ((PostViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
((PostViewHolder) holder).contentTextView.setVisibility(View.GONE); ((PostViewHolder) holder).contentTextView.setVisibility(View.GONE);
((PostViewHolder) holder).upvoteButton.clearColorFilter(); ((PostViewHolder) holder).upvoteButton.clearColorFilter();
((PostViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
((PostViewHolder) holder).downvoteButton.clearColorFilter(); ((PostViewHolder) holder).downvoteButton.clearColorFilter();
} else if (holder instanceof PostCompactViewHolder) { } else if (holder instanceof PostCompactViewHolder) {
mGlide.clear(((PostCompactViewHolder) holder).imageView); mGlide.clear(((PostCompactViewHolder) holder).imageView);
@ -1483,7 +1486,7 @@ public class PostRecyclerViewAdapter extends PagedListAdapter<Post, RecyclerView
((PostCompactViewHolder) holder).playButtonImageView.setVisibility(View.GONE); ((PostCompactViewHolder) holder).playButtonImageView.setVisibility(View.GONE);
((PostCompactViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE); ((PostCompactViewHolder) holder).noPreviewLinkImageView.setVisibility(View.GONE);
((PostCompactViewHolder) holder).upvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).upvoteButton.clearColorFilter();
((PostCompactViewHolder) holder).scoreTextView.setTextColor(ContextCompat.getColor(mActivity, R.color.defaultTextColor)); ((PostCompactViewHolder) holder).scoreTextView.setTextColor(mSecondaryTextColor);
((PostCompactViewHolder) holder).downvoteButton.clearColorFilter(); ((PostCompactViewHolder) holder).downvoteButton.clearColorFilter();
} }
} }

View File

@ -8,7 +8,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -42,6 +41,7 @@ import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SortType;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@ -211,11 +211,8 @@ public class CommentsListingFragment extends Fragment implements FragmentCommuni
mCommentViewModel.getPaginationNetworkState().observe(this, networkState -> mAdapter.setNetworkState(networkState)); mCommentViewModel.getPaginationNetworkState().observe(this, networkState -> mAdapter.setNetworkState(networkState));
mSwipeRefreshLayout.setOnRefreshListener(() -> mCommentViewModel.refresh()); mSwipeRefreshLayout.setOnRefreshListener(() -> mCommentViewModel.refresh());
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent));
mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
} }
public void changeSortType(SortType sortType) { public void changeSortType(SortType sortType) {

View File

@ -6,7 +6,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -34,6 +33,7 @@ import ml.docilealligator.infinityforreddit.Infinity;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserViewModel; import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserViewModel;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@ -92,10 +92,8 @@ public class FollowedUsersListingFragment extends Fragment implements FragmentCo
if (mActivity instanceof SubscribedThingListingActivity) { if (mActivity instanceof SubscribedThingListingActivity) {
mSwipeRefreshLayout.setOnRefreshListener(() -> ((SubscribedThingListingActivity) mActivity).loadSubscriptions(true)); mSwipeRefreshLayout.setOnRefreshListener(() -> ((SubscribedThingListingActivity) mActivity).loadSubscriptions(true));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor));
mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent));
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
} else { } else {
mSwipeRefreshLayout.setEnabled(false); mSwipeRefreshLayout.setEnabled(false);
} }

View File

@ -11,7 +11,6 @@ import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.os.CountDownTimer; import android.os.CountDownTimer;
import android.os.Handler; import android.os.Handler;
import android.util.TypedValue;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
@ -70,6 +69,7 @@ import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SortType;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@ -262,11 +262,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator {
}; };
mSwipeRefreshLayout.setOnRefreshListener(this::refresh); mSwipeRefreshLayout.setOnRefreshListener(this::refresh);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(activity, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(activity, R.attr.colorAccent));
activity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
if (savedInstanceState != null) { if (savedInstanceState != null) {
int recyclerViewPosition = savedInstanceState.getInt(RECYCLER_VIEW_POSITION_STATE); int recyclerViewPosition = savedInstanceState.getInt(RECYCLER_VIEW_POSITION_STATE);

View File

@ -9,7 +9,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -43,6 +42,7 @@ import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SortType;
import ml.docilealligator.infinityforreddit.SubredditListingViewModel; import ml.docilealligator.infinityforreddit.SubredditListingViewModel;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@ -175,11 +175,8 @@ public class SubredditListingFragment extends Fragment implements FragmentCommun
}); });
mSwipeRefreshLayout.setOnRefreshListener(() -> mSubredditListingViewModel.refresh()); mSwipeRefreshLayout.setOnRefreshListener(() -> mSubredditListingViewModel.refresh());
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent));
mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
return rootView; return rootView;
} }

View File

@ -7,7 +7,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -37,6 +36,7 @@ import ml.docilealligator.infinityforreddit.Infinity;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditViewModel; import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditViewModel;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@ -98,10 +98,8 @@ public class SubscribedSubredditsListingFragment extends Fragment implements Fra
if (mActivity instanceof SubscribedThingListingActivity) { if (mActivity instanceof SubscribedThingListingActivity) {
mSwipeRefreshLayout.setOnRefreshListener(() -> ((SubscribedThingListingActivity) mActivity).loadSubscriptions(true)); mSwipeRefreshLayout.setOnRefreshListener(() -> ((SubscribedThingListingActivity) mActivity).loadSubscriptions(true));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor));
mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent));
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
} else { } else {
mSwipeRefreshLayout.setEnabled(false); mSwipeRefreshLayout.setEnabled(false);
} }

View File

@ -8,7 +8,6 @@ import android.content.res.Configuration;
import android.content.res.Resources; import android.content.res.Resources;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
import android.util.TypedValue;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
@ -40,6 +39,7 @@ import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase;
import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SortType;
import ml.docilealligator.infinityforreddit.UserListingViewModel; import ml.docilealligator.infinityforreddit.UserListingViewModel;
import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
@ -155,11 +155,8 @@ public class UserListingFragment extends Fragment implements FragmentCommunicato
}); });
mSwipeRefreshLayout.setOnRefreshListener(() -> mUserListingViewModel.refresh()); mSwipeRefreshLayout.setOnRefreshListener(() -> mUserListingViewModel.refresh());
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor));
TypedValue typedValue = new TypedValue(); mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent));
mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true);
mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data);
mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent);
return rootView; return rootView;
} }

View File

@ -7,6 +7,8 @@ import android.content.Context;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import androidx.core.app.NotificationManagerCompat; import androidx.core.app.NotificationManagerCompat;
import ml.docilealligator.infinityforreddit.Utils.Utils;
public class NotificationUtils { public class NotificationUtils {
public static final String CHANNEL_SUBMIT_POST = "Submit Post"; public static final String CHANNEL_SUBMIT_POST = "Submit Post";
static final String CHANNEL_ID_NEW_MESSAGES = "new_messages"; static final String CHANNEL_ID_NEW_MESSAGES = "new_messages";
@ -31,7 +33,7 @@ public class NotificationUtils {
.setContentTitle(title) .setContentTitle(title)
.setContentText(content) .setContentText(content)
.setSmallIcon(R.drawable.ic_notification) .setSmallIcon(R.drawable.ic_notification)
.setColor(context.getResources().getColor(R.color.notificationIconColor)) .setColor(context.getResources().getColor(Utils.getAttributeColor(context, R.attr.notificationIconColor)))
.setStyle(new NotificationCompat.BigTextStyle() .setStyle(new NotificationCompat.BigTextStyle()
.setSummaryText(summary) .setSummaryText(summary)
.bigText(content)) .bigText(content))
@ -52,7 +54,7 @@ public class NotificationUtils {
//set content text to support devices running API level < 24 //set content text to support devices running API level < 24
.setContentText(content) .setContentText(content)
.setSmallIcon(R.drawable.ic_notification) .setSmallIcon(R.drawable.ic_notification)
.setColor(context.getResources().getColor(R.color.notificationIconColor)) .setColor(Utils.getAttributeColor(context, R.attr.notificationIconColor))
.setGroup(group) .setGroup(group)
.setGroupSummary(true) .setGroupSummary(true)
.setAutoCancel(true); .setAutoCancel(true);

View File

@ -4,6 +4,7 @@ import android.app.Notification;
import android.app.NotificationChannel; import android.app.NotificationChannel;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.app.Service; import android.app.Service;
import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
@ -38,6 +39,7 @@ import ml.docilealligator.infinityforreddit.NotificationUtils;
import ml.docilealligator.infinityforreddit.Post.Post; import ml.docilealligator.infinityforreddit.Post.Post;
import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.R;
import ml.docilealligator.infinityforreddit.SubmitPost; import ml.docilealligator.infinityforreddit.SubmitPost;
import ml.docilealligator.infinityforreddit.Utils.Utils;
import retrofit2.Retrofit; import retrofit2.Retrofit;
public class SubmitPostService extends Service { public class SubmitPostService extends Service {
@ -106,27 +108,27 @@ public class SubmitPostService extends Service {
if (postType == EXTRA_POST_TEXT_OR_LINK) { if (postType == EXTRA_POST_TEXT_OR_LINK) {
content = intent.getStringExtra(EXTRA_CONTENT); content = intent.getStringExtra(EXTRA_CONTENT);
kind = intent.getStringExtra(EXTRA_KIND); kind = intent.getStringExtra(EXTRA_KIND);
startForeground(NotificationUtils.SUBMIT_POST_SERVICE_NOTIFICATION_ID, createNotification(R.string.posting)); startForeground(NotificationUtils.SUBMIT_POST_SERVICE_NOTIFICATION_ID, createNotification(this, R.string.posting));
submitTextOrLinkPost(); submitTextOrLinkPost();
} else if (postType == EXTRA_POST_TYPE_IMAGE) { } else if (postType == EXTRA_POST_TYPE_IMAGE) {
mediaUri = intent.getData(); mediaUri = intent.getData();
startForeground(NotificationUtils.SUBMIT_POST_SERVICE_NOTIFICATION_ID, createNotification(R.string.posting_image)); startForeground(NotificationUtils.SUBMIT_POST_SERVICE_NOTIFICATION_ID, createNotification(this, R.string.posting_image));
submitImagePost(); submitImagePost();
} else { } else {
mediaUri = intent.getData(); mediaUri = intent.getData();
startForeground(NotificationUtils.SUBMIT_POST_SERVICE_NOTIFICATION_ID, createNotification(R.string.posting_video)); startForeground(NotificationUtils.SUBMIT_POST_SERVICE_NOTIFICATION_ID, createNotification(this, R.string.posting_video));
submitVideoPost(); submitVideoPost();
} }
return START_NOT_STICKY; return START_NOT_STICKY;
} }
private Notification createNotification(int stringResId) { private Notification createNotification(Context context, int stringResId) {
return new NotificationCompat.Builder(this, NotificationUtils.CHANNEL_SUBMIT_POST) return new NotificationCompat.Builder(this, NotificationUtils.CHANNEL_SUBMIT_POST)
.setContentTitle(getString(stringResId)) .setContentTitle(getString(stringResId))
.setContentText(getString(R.string.please_wait)) .setContentText(getString(R.string.please_wait))
.setSmallIcon(R.drawable.ic_notification) .setSmallIcon(R.drawable.ic_notification)
.setColor(getResources().getColor(R.color.notificationIconColor)) .setColor(Utils.getAttributeColor(context, R.attr.notificationIconColor))
.build(); .build();
} }

View File

@ -2,7 +2,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item> <item>
<shape android:shape="oval"> <shape android:shape="oval">
<solid android:color="@color/backgroundColorInverse" /> <solid android:color="@color/playButtonBackgroundColor" />
</shape> </shape>
</item> </item>

View File

@ -38,7 +38,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp" android:layout_margin="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/title_font_16" /> android:textSize="?attr/title_font_16" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
@ -54,7 +54,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/comment_edit_text_comment_activity" android:id="@+id/comment_edit_text_comment_activity"
@ -68,7 +68,7 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/content_font_18" android:textSize="?attr/content_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
</LinearLayout> </LinearLayout>

View File

@ -41,13 +41,13 @@
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:maxLength="50" /> android:maxLength="50" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/description_edit_text_create_multi_reddit_activity" android:id="@+id/description_edit_text_create_multi_reddit_activity"
@ -58,12 +58,12 @@
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<LinearLayout <LinearLayout
android:id="@+id/visibility_wrapper_linear_layout_create_multi_reddit_activity" android:id="@+id/visibility_wrapper_linear_layout_create_multi_reddit_activity"
@ -80,7 +80,7 @@
android:layout_weight="1" android:layout_weight="1"
android:text="@string/private_multi_reddit" android:text="@string/private_multi_reddit"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<Switch <Switch
android:id="@+id/visibility_switch_create_multi_reddit_activity" android:id="@+id/visibility_switch_create_multi_reddit_activity"
@ -97,7 +97,7 @@
android:padding="16dp" android:padding="16dp"
android:text="@string/select_subreddit" android:text="@string/select_subreddit"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:clickable="true" android:clickable="true"
android:focusable="true" android:focusable="true"
android:background="?attr/selectableItemBackground" /> android:background="?attr/selectableItemBackground" />

View File

@ -33,7 +33,7 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/content_font_18" android:textSize="?attr/content_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> app:layout_behavior="@string/appbar_scrolling_view_behavior" />
</androidx.coordinatorlayout.widget.CoordinatorLayout> </androidx.coordinatorlayout.widget.CoordinatorLayout>

View File

@ -40,12 +40,12 @@
android:gravity="top" android:gravity="top"
android:padding="16dp" android:padding="16dp"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_text_content_edit_text_edit_post_activity" android:id="@+id/post_text_content_edit_text_edit_post_activity"
@ -57,7 +57,7 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/content_font_18" android:textSize="?attr/content_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
</LinearLayout> </LinearLayout>

View File

@ -75,7 +75,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -88,7 +88,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/flair" android:text="@string/flair"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" android:visibility="gone"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
@ -103,7 +103,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/spoiler" android:text="@string/spoiler"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedBorderColor="?attr/spoilerColor"
@ -117,10 +117,10 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/nsfw" android:text="@string/nsfw"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -129,7 +129,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_title_edit_text_post_image_activity" android:id="@+id/post_title_edit_text_post_image_activity"
@ -141,12 +141,12 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/select_image_constraint_layout_post_image_activity" android:id="@+id/select_image_constraint_layout_post_image_activity"
@ -188,7 +188,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="16dp" android:padding="16dp"
android:text="@string/select_again" android:text="@string/select_again"
android:textColor="@color/colorAccent" android:textColor="?attr/colorAccent"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" /> android:visibility="gone" />

View File

@ -75,7 +75,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -88,7 +88,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/flair" android:text="@string/flair"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" android:visibility="gone"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
@ -103,7 +103,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/spoiler" android:text="@string/spoiler"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedBorderColor="?attr/spoilerColor"
@ -117,10 +117,10 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/nsfw" android:text="@string/nsfw"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -129,7 +129,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_title_edit_text_post_link_activity" android:id="@+id/post_title_edit_text_post_link_activity"
@ -141,12 +141,12 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_link_edit_text_post_link_activity" android:id="@+id/post_link_edit_text_post_link_activity"
@ -158,7 +158,7 @@
android:inputType="textMultiLine" android:inputType="textMultiLine"
android:textSize="?attr/content_font_18" android:textSize="?attr/content_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
</LinearLayout> </LinearLayout>

View File

@ -75,7 +75,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -88,7 +88,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/flair" android:text="@string/flair"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" android:visibility="gone"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
@ -103,7 +103,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/spoiler" android:text="@string/spoiler"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedBorderColor="?attr/spoilerColor"
@ -117,10 +117,10 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/nsfw" android:text="@string/nsfw"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -129,7 +129,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_title_edit_text_post_text_activity" android:id="@+id/post_title_edit_text_post_text_activity"
@ -141,12 +141,12 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_text_content_edit_text_post_text_activity" android:id="@+id/post_text_content_edit_text_post_text_activity"
@ -158,7 +158,7 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/content_font_18" android:textSize="?attr/content_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
</LinearLayout> </LinearLayout>

View File

@ -75,7 +75,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
@ -88,7 +88,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/flair" android:text="@string/flair"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" android:visibility="gone"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
@ -103,7 +103,7 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/spoiler" android:text="@string/spoiler"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="?attr/spoilerColor" app:lib_setRoundedBorderColor="?attr/spoilerColor"
@ -117,10 +117,10 @@
android:layout_margin="16dp" android:layout_margin="16dp"
android:padding="4dp" android:padding="4dp"
android:text="@string/nsfw" android:text="@string/nsfw"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -129,7 +129,7 @@
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<EditText <EditText
android:id="@+id/post_title_edit_text_post_video_activity" android:id="@+id/post_title_edit_text_post_video_activity"
@ -141,12 +141,12 @@
android:inputType="textCapSentences|textMultiLine" android:inputType="textCapSentences|textMultiLine"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<View <View
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/select_video_constraint_layout_post_video_activity" android:id="@+id/select_video_constraint_layout_post_video_activity"
@ -188,7 +188,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="16dp" android:padding="16dp"
android:text="@string/select_again" android:text="@string/select_again"
android:textColor="@color/colorAccent" android:textColor="?attr/colorAccent"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" /> android:visibility="gone" />

View File

@ -62,7 +62,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/search_in" android:text="@string/search_in"
android:textColor="@color/colorAccent" android:textColor="?attr/colorAccent"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -74,7 +74,7 @@
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_toEndOf="@id/search_in_text_view_search_activity" android:layout_toEndOf="@id/search_in_text_view_search_activity"
android:text="@string/all_subreddits" android:text="@string/all_subreddits"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</RelativeLayout> </RelativeLayout>

View File

@ -61,7 +61,7 @@
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:textSize="?attr/font_18" android:textSize="?attr/font_18"
android:textColor="@color/colorAccent" android:textColor="?attr/subreddit"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>
<com.google.android.material.chip.Chip <com.google.android.material.chip.Chip
@ -81,7 +81,7 @@
android:id="@+id/subscriber_count_text_view_view_subreddit_detail_activity" android:id="@+id/subscriber_count_text_view_view_subreddit_detail_activity"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:layout_alignParentStart="true" android:layout_alignParentStart="true"
android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" /> android:layout_toStartOf="@id/online_subscriber_count_text_view_view_subreddit_detail_activity" />
@ -91,7 +91,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentEnd="true" android:layout_alignParentEnd="true"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</RelativeLayout> </RelativeLayout>
@ -101,7 +101,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone"/> android:visibility="gone"/>
@ -148,7 +148,7 @@
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp" android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView <ImageView
@ -160,7 +160,7 @@
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:src="@drawable/ic_multi_reddit_24dp" android:src="@drawable/ic_multi_reddit_24dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
<TextView <TextView
@ -178,7 +178,7 @@
android:paddingTop="8dp" android:paddingTop="8dp"
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:src="@drawable/ic_inbox_24dp" android:src="@drawable/ic_inbox_24dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
<ImageView <ImageView
@ -191,7 +191,7 @@
android:paddingBottom="8dp" android:paddingBottom="8dp"
android:gravity="center" android:gravity="center"
android:src="@drawable/ic_account_circle_24dp" android:src="@drawable/ic_account_circle_24dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:background="?attr/selectableItemBackgroundBorderless" /> android:background="?attr/selectableItemBackgroundBorderless" />
</LinearLayout> </LinearLayout>

View File

@ -75,7 +75,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="16dp" android:layout_marginTop="16dp"
android:layout_marginBottom="16dp" android:layout_marginBottom="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>

View File

@ -9,7 +9,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="24dp" android:layout_margin="24dp"
android:background="#00000000" android:background="#00000000"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:hint="@string/flair" android:hint="@string/flair"
android:maxLength="64" /> android:maxLength="64" />
@ -20,7 +20,7 @@
android:layout_marginStart="24dp" android:layout_marginStart="24dp"
android:layout_marginEnd="24dp" android:layout_marginEnd="24dp"
android:text="@string/only_allow_64_chars" android:text="@string/only_allow_64_chars"
android:textColor="@color/colorAccent" android:textColor="?attr/colorAccent"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</LinearLayout> </LinearLayout>

View File

@ -23,7 +23,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/edit" android:text="@string/edit"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" /> android:visibility="gone" />
@ -41,7 +41,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/delete" android:text="@string/delete"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:visibility="gone" /> android:visibility="gone" />
@ -60,7 +60,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/share" android:text="@string/share"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -78,7 +78,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/copy_text" android:text="@string/copy_text"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</LinearLayout> </LinearLayout>

View File

@ -17,7 +17,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/copy_raw_text" android:text="@string/copy_raw_text"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -32,7 +32,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/copy_markdown" android:text="@string/copy_markdown"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -47,7 +47,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/copy_all_raw_text" android:text="@string/copy_all_raw_text"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -62,7 +62,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/copy_all_markdown" android:text="@string/copy_all_markdown"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"

View File

@ -23,7 +23,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_best" android:text="@string/sort_best"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -38,7 +38,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_confidence" android:text="@string/sort_confidence"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -53,7 +53,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -68,7 +68,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -83,7 +83,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_controversial" android:text="@string/sort_controversial"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -98,7 +98,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_old" android:text="@string/sort_old"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -113,7 +113,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_random" android:text="@string/sort_random"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -128,7 +128,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_qa" android:text="@string/sort_qa"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -143,7 +143,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/sort_live" android:text="@string/sort_live"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</LinearLayout> </LinearLayout>

View File

@ -24,7 +24,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/post_layout_card" android:text="@string/post_layout_card"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -39,7 +39,7 @@
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:text="@string/post_layout_compact" android:text="@string/post_layout_compact"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</LinearLayout> </LinearLayout>

View File

@ -20,7 +20,7 @@
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:text="@string/bottom_sheet_post_text" android:text="@string/bottom_sheet_post_text"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_outline_text_24px" android:drawableStart="@drawable/ic_outline_text_24px"
android:drawablePadding="48dp" android:drawablePadding="48dp"
@ -38,7 +38,7 @@
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:text="@string/bottom_sheet_post_link" android:text="@string/bottom_sheet_post_link"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_link" android:drawableStart="@drawable/ic_link"
android:drawablePadding="48dp" android:drawablePadding="48dp"
@ -56,7 +56,7 @@
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:text="@string/bottom_sheet_post_video" android:text="@string/bottom_sheet_post_video"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_outline_video_24dp" android:drawableStart="@drawable/ic_outline_video_24dp"
android:drawablePadding="48dp" android:drawablePadding="48dp"
@ -74,7 +74,7 @@
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:text="@string/bottom_sheet_post_image" android:text="@string/bottom_sheet_post_image"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_image_24dp" android:drawableStart="@drawable/ic_image_24dp"
android:drawablePadding="48dp" android:drawablePadding="48dp"

View File

@ -15,7 +15,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_relevance" android:text="@string/sort_relevance"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -30,7 +30,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_hot" android:text="@string/sort_hot"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -45,7 +45,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -60,7 +60,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -75,7 +75,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_comments" android:text="@string/sort_comments"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"

View File

@ -15,7 +15,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_relevance" android:text="@string/sort_relevance"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -30,7 +30,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_activity" android:text="@string/sort_activity"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"

View File

@ -20,7 +20,7 @@
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:text="@string/share_post_link" android:text="@string/share_post_link"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_link" android:drawableStart="@drawable/ic_link"
android:drawablePadding="48dp" android:drawablePadding="48dp"
@ -38,7 +38,7 @@
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:text="@string/copy_post_link" android:text="@string/copy_post_link"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_copy_24dp" android:drawableStart="@drawable/ic_copy_24dp"
android:drawablePadding="48dp" android:drawablePadding="48dp"
@ -55,7 +55,7 @@
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_link" android:drawableStart="@drawable/ic_link"
android:drawablePadding="48dp" android:drawablePadding="48dp"
@ -73,7 +73,7 @@
android:paddingBottom="16dp" android:paddingBottom="16dp"
android:paddingStart="32dp" android:paddingStart="32dp"
android:paddingEnd="32dp" android:paddingEnd="32dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:drawableStart="@drawable/ic_copy_24dp" android:drawableStart="@drawable/ic_copy_24dp"
android:drawablePadding="48dp" android:drawablePadding="48dp"

View File

@ -17,7 +17,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_time_hour" android:text="@string/sort_time_hour"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -32,7 +32,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_time_day" android:text="@string/sort_time_day"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -47,7 +47,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_time_week" android:text="@string/sort_time_week"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -62,7 +62,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_time_month" android:text="@string/sort_time_month"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -77,7 +77,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_time_year" android:text="@string/sort_time_year"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -92,7 +92,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_time_all_time" android:text="@string/sort_time_all_time"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"

View File

@ -15,7 +15,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_best" android:text="@string/sort_best"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -30,7 +30,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_hot" android:text="@string/sort_hot"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -45,7 +45,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -60,7 +60,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_random" android:text="@string/sort_random"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -75,7 +75,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_rising" android:text="@string/sort_rising"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -90,7 +90,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -105,7 +105,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_controversial" android:text="@string/sort_controversial"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"

View File

@ -9,7 +9,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_new" android:text="@string/sort_new"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -24,7 +24,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_hot" android:text="@string/sort_hot"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -39,7 +39,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_top" android:text="@string/sort_top"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"
@ -54,7 +54,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="@string/sort_controversial" android:text="@string/sort_controversial"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:paddingTop="16dp" android:paddingTop="16dp"
android:paddingBottom="16dp" android:paddingBottom="16dp"

View File

@ -14,7 +14,7 @@
android:id="@+id/name_text_view_item_acknowledgement" android:id="@+id/name_text_view_item_acknowledgement"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_16" /> android:textSize="?attr/font_16" />
<TextView <TextView

View File

@ -96,7 +96,7 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/content_font_default" /> android:textSize="?attr/content_font_default" />
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout
@ -215,7 +215,7 @@
android:id="@+id/divider_item_comment" android:id="@+id/divider_item_comment"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" android:background="?attr/dividerColor"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>

View File

@ -11,7 +11,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="16dp" android:padding="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<ImageView <ImageView
@ -22,7 +22,7 @@
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:src="@drawable/ic_outline_edit_24px" android:src="@drawable/ic_outline_edit_24px"
android:visibility="gone" android:visibility="gone"
android:tint="@color/primaryTextColor" android:tint="?attr/primaryTextColor"
android:background="?actionBarItemBackground" android:background="?actionBarItemBackground"
android:clickable="true" android:clickable="true"
android:focusable="true" /> android:focusable="true" />

View File

@ -11,7 +11,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_margin="16dp" android:layout_margin="16dp"
app:mlpb_progress_stoke_width="3dp" app:mlpb_progress_stoke_width="3dp"
app:mlpb_progress_color="@color/colorAccent" app:mlpb_progress_color="?attr/colorAccent"
app:mlpb_background_color="?attr/circularProgressBarBackground" app:mlpb_background_color="?attr/circularProgressBarBackground"
android:layout_gravity="center_horizontal"/> android:layout_gravity="center_horizontal"/>

View File

@ -21,7 +21,7 @@
android:gravity="center" android:gravity="center"
android:padding="8dp" android:padding="8dp"
android:text="@string/comment_load_more_comments" android:text="@string/comment_load_more_comments"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</LinearLayout> </LinearLayout>
@ -30,7 +30,7 @@
android:id="@+id/divider_item_load_more_comments_placeholder" android:id="@+id/divider_item_load_more_comments_placeholder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" android:background="?attr/dividerColor"
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>

View File

@ -10,7 +10,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView
@ -19,14 +19,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:textSize="?attr/font_16" android:textSize="?attr/font_16"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<TextView <TextView
android:id="@+id/title_text_view_item_message" android:id="@+id/title_text_view_item_message"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="8dp" android:layout_marginBottom="8dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<TextView <TextView

View File

@ -19,7 +19,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical" />

View File

@ -20,7 +20,7 @@
android:layout_marginStart="16dp" android:layout_marginStart="16dp"
android:layout_marginEnd="16dp" android:layout_marginEnd="16dp"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
</LinearLayout> </LinearLayout>

View File

@ -2,4 +2,4 @@
<View xmlns:android="http://schemas.android.com/apk/res/android" <View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />

View File

@ -8,5 +8,5 @@
android:focusable="true" android:focusable="true"
android:gravity="center_vertical" android:gravity="center_vertical"
android:padding="16dp" android:padding="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />

View File

@ -20,7 +20,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical" />

View File

@ -98,7 +98,7 @@
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:textColor="@color/primaryTextColor" /> android:textColor="?attr/primaryTextColor" />
<TextView <TextView
android:id="@+id/content_text_view_item_post" android:id="@+id/content_text_view_item_post"
@ -158,8 +158,8 @@
android:textSize="?attr/font_12" android:textSize="?attr/font_12"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:visibility="gone" android:visibility="gone"
app:lib_setRoundedBGColor="@color/colorAccent" app:lib_setRoundedBGColor="?attr/nsfwColor"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -287,7 +287,7 @@
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_link" android:src="@drawable/ic_link"
android:tint="@android:color/tab_indicator_text" android:tint="@android:color/tab_indicator_text"
android:background="@color/grey" android:background="?attr/noPreviewLinkBackgroundColor"
android:visibility="gone"/> android:visibility="gone"/>
<androidx.constraintlayout.widget.ConstraintLayout <androidx.constraintlayout.widget.ConstraintLayout

View File

@ -84,7 +84,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
app:layout_constraintBottom_toTopOf="@id/flow_layout_item_post_compact" app:layout_constraintBottom_toTopOf="@id/flow_layout_item_post_compact"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
@ -146,8 +146,8 @@
android:textSize="?attr/font_10" android:textSize="?attr/font_10"
android:visibility="gone" android:visibility="gone"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedBGColor="@color/colorAccent" app:lib_setRoundedBGColor="?attr/nsfwColor"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -265,7 +265,7 @@
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_link" android:src="@drawable/ic_link"
android:tint="@android:color/tab_indicator_text" android:tint="@android:color/tab_indicator_text"
android:background="@color/grey" android:background="?attr/noPreviewLinkBackgroundColor"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/barrier2" app:layout_constraintStart_toEndOf="@id/barrier2"
@ -385,7 +385,7 @@
android:id="@+id/divider_item_post_compact" android:id="@+id/divider_item_post_compact"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="1dp" android:layout_height="1dp"
android:background="@color/dividerColor" /> android:background="?attr/dividerColor" />
</LinearLayout> </LinearLayout>

View File

@ -78,7 +78,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:paddingStart="16dp" android:paddingStart="16dp"
android:paddingEnd="16dp" android:paddingEnd="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/title_font_18" android:textSize="?attr/title_font_18"
android:textIsSelectable="true" android:textIsSelectable="true"
android:enabled="true" android:enabled="true"
@ -140,8 +140,8 @@
android:textSize="?attr/font_12" android:textSize="?attr/font_12"
android:textColor="@android:color/white" android:textColor="@android:color/white"
android:visibility="gone" android:visibility="gone"
app:lib_setRoundedBGColor="@color/colorAccent" app:lib_setRoundedBGColor="?attr/nsfwColor"
app:lib_setRoundedBorderColor="@color/colorAccent" app:lib_setRoundedBorderColor="?attr/nsfwColor"
app:lib_setRadius="3dp" app:lib_setRadius="3dp"
app:lib_setRoundedView="true" app:lib_setRoundedView="true"
app:lib_setShape="rectangle" /> app:lib_setShape="rectangle" />
@ -267,7 +267,7 @@
android:id="@+id/image_view_no_preview_link_item_post_detail" android:id="@+id/image_view_no_preview_link_item_post_detail"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="150dp" android:layout_height="150dp"
android:background="@color/grey" android:background="?attr/noPreviewLinkBackgroundColor"
android:scaleType="center" android:scaleType="center"
android:src="@drawable/ic_link" android:src="@drawable/ic_link"
android:tint="@android:color/tab_indicator_text" android:tint="@android:color/tab_indicator_text"

View File

@ -8,7 +8,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="16dp" android:padding="16dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/title_font_16" /> android:textSize="?attr/title_font_16" />
<TextView <TextView

View File

@ -24,7 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/subreddit_icon_gif_image_view_item_subreddit_listing" app:layout_constraintStart_toEndOf="@+id/subreddit_icon_gif_image_view_item_subreddit_listing"

View File

@ -25,7 +25,7 @@
android:layout_weight="1" android:layout_weight="1"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginEnd="32dp" android:layout_marginEnd="32dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" /> android:textSize="?attr/font_default" />
<CheckBox <CheckBox

View File

@ -20,7 +20,7 @@
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" android:layout_weight="1"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
android:layout_gravity="center_vertical" /> android:layout_gravity="center_vertical" />

View File

@ -24,7 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_marginStart="32dp" android:layout_marginStart="32dp"
android:textColor="@color/primaryTextColor" android:textColor="?attr/primaryTextColor"
android:textSize="?attr/font_default" android:textSize="?attr/font_default"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/user_icon_gif_image_view_item_user_listing" app:layout_constraintStart_toEndOf="@+id/user_icon_gif_image_view_item_user_listing"

View File

@ -1,18 +1,12 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" <TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center"
android:padding="16dp" android:padding="16dp"
android:background="?attr/selectableItemBackground" android:background="?attr/selectableItemBackground"
android:clickable="true" android:clickable="true"
android:focusable="true"> android:focusable="true"
android:text="@string/view_all_comments"
<TextView android:textColor="?attr/colorAccent"
android:layout_width="match_parent" android:textSize="?attr/font_default" />
android:layout_height="wrap_content"
android:text="@string/view_all_comments"
android:gravity="center"
android:textColor="@color/colorAccent"
android:textSize="?attr/font_default" />
</LinearLayout>

View File

@ -2,7 +2,7 @@
<style name="AppTheme.Launcher" parent="@style/AppTheme.NoActionBarWithTransparentStatusBar"> <style name="AppTheme.Launcher" parent="@style/AppTheme.NoActionBarWithTransparentStatusBar">
<item name="android:windowBackground">@drawable/splash_screen</item> <item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:navigationBarColor">@color/navBarColor</item> <item name="android:navigationBarColor">#121212</item>
</style> </style>
</resources> </resources>

View File

@ -8,13 +8,13 @@
<color name="gold">#FFC107</color> <color name="gold">#FFC107</color>
<color name="primaryTextColor">#FFFFFF</color> <!--<color name="primaryTextColor">#FFFFFF</color>-->
<!--<color name="colorPrimaryDarkDayNightTheme">#1E88E5</color>--> <!--<color name="colorPrimaryDarkDayNightTheme">#1E88E5</color>-->
<color name="dividerColor">#69666C</color> <!--<color name="dividerColor">#69666C</color>-->
<color name="grey">#424242</color> <!--<color name="grey">#424242</color>-->
<color name="backgroundColor">#121212</color> <color name="backgroundColor">#121212</color>
@ -22,11 +22,11 @@
<color name="backgroundColorPrimaryDark">#1565C0</color>--> <color name="backgroundColorPrimaryDark">#1565C0</color>-->
<color name="backgroundColorInverse">#FFFFFF</color> <color name="playButtonBackgroundColor">#FFFFFF</color>
<color name="roundedBottomSheetPrimaryBackground">#242424</color> <color name="roundedBottomSheetPrimaryBackground">#242424</color>
<color name="voteAndReplyUnavailableVoteButtonColor">#3C3C3C</color> <!--<color name="voteAndReplyUnavailableVoteButtonColor">#3C3C3C</color>-->
<!--<color name="tabLayoutWithExpandedCollapsingToolbarTextColor">#FFFFFF</color> <!--<color name="tabLayoutWithExpandedCollapsingToolbarTextColor">#FFFFFF</color>
@ -40,25 +40,25 @@
<color name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator">@color/tabLayoutWithCollapsedCollapsingToolbarTextColor</color>--> <color name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator">@color/tabLayoutWithCollapsedCollapsingToolbarTextColor</color>-->
<color name="navBarColor">@color/backgroundColor</color> <!--<color name="navBarColor">@color/backgroundColor</color>-->
<color name="cardViewBackgroundColor">#242424</color> <!--<color name="cardViewBackgroundColor">#242424</color>-->
<color name="singleCommentThreadBackgroundColor">#123E77</color> <!--<color name="singleCommentThreadBackgroundColor">#123E77</color>-->
<color name="unreadMessageBackgroundColor">#123E77</color> <!--<color name="unreadMessageBackgroundColor">#123E77</color>-->
<color name="notificationIconColor">#1565C0</color> <!--<color name="notificationIconColor">#1565C0</color>-->
<color name="defaultTextColor">#B3FFFFFF</color> <!--<color name="defaultTextColor">#B3FFFFFF</color>-->
<color name="commentVerticalBar1">#1565C0</color> <!--<color name="commentVerticalBar1">#1565C0</color>
<color name="commentVerticalBar2">#C300B3</color> <color name="commentVerticalBar2">#C300B3</color>
<color name="commentVerticalBar3">#00B8DA</color> <color name="commentVerticalBar3">#00B8DA</color>
<color name="commentVerticalBar4">#EDCA00</color> <color name="commentVerticalBar4">#EDCA00</color>
<color name="commentVerticalBar5">#EE0219</color> <color name="commentVerticalBar5">#EE0219</color>
<color name="commentVerticalBar6">#00B925</color> <color name="commentVerticalBar6">#00B925</color>
<color name="commentVerticalBar7">#EE4602</color> <color name="commentVerticalBar7">#EE4602</color>-->
<!--<color name="toolbarAndTabBackgroundColor">#282828</color>--> <!--<color name="toolbarAndTabBackgroundColor">#282828</color>-->
</resources> </resources>

View File

@ -2,7 +2,7 @@
<style name="AppTheme.Launcher" parent="@style/AppTheme.NoActionBarWithTransparentStatusBar"> <style name="AppTheme.Launcher" parent="@style/AppTheme.NoActionBarWithTransparentStatusBar">
<item name="android:windowBackground">@drawable/splash_screen</item> <item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:navigationBarColor">@color/navBarColor</item> <item name="android:navigationBarColor">#FFFFFF</item>
<item name="android:windowLightStatusBar">true</item> <item name="android:windowLightStatusBar">true</item>
<item name="android:windowLightNavigationBar">true</item> <item name="android:windowLightNavigationBar">true</item>
</style> </style>

View File

@ -4,7 +4,7 @@
<declare-styleable name="FontStyle"> <declare-styleable name="FontStyle">
<attr name="font_default" format="dimension"/> <attr name="font_default" format="dimension"/>
<attr name="font_10" format="dimension" /> <attr name="font_10" format="dimension"/>
<attr name="font_12" format="dimension"/> <attr name="font_12" format="dimension"/>
<attr name="font_16" format="dimension"/> <attr name="font_16" format="dimension"/>
<attr name="font_18" format="dimension"/> <attr name="font_18" format="dimension"/>
@ -30,36 +30,51 @@
<declare-styleable name="Theme"> <declare-styleable name="Theme">
<attr name="colorPrimary" format="color"/> <attr name="colorPrimary" format="color"/>
<attr name="colorPrimaryDark" format="color"/> <attr name="colorPrimaryDark" format="color"/>
<attr name="colorAccent" format="color" /> <attr name="colorAccent" format="color"/>
<attr name="colorPrimaryLightTheme" format="color" /> <attr name="colorPrimaryLightTheme" format="color"/>
<attr name="primaryTextColor" format="color"/>
<attr name="secondaryTextColor" format="color"/>
<attr name="backgroundColor" format="color"/> <attr name="backgroundColor" format="color"/>
<attr name="roundedBottomSheetPrimaryBackground" format="color"/> <attr name="roundedBottomSheetPrimaryBackground" format="color"/>
<attr name="cardViewBackgroundColor" format="color"/> <attr name="cardViewBackgroundColor" format="color"/>
<attr name="toolbarAndTabBackgroundColor" format="color"/> <attr name="toolbarAndTabBackgroundColor" format="color"/>
<attr name="circularProgressBarBackground" format="color"/> <attr name="circularProgressBarBackground" format="color"/>
<attr name="tabLayoutWithExpandedCollapsingToolbarTabBackground" format="color"/> <attr name="tabLayoutWithExpandedCollapsingToolbarTabBackground" format="color"/>
<attr name="tabLayoutWithExpandedCollapsingToolbarTextColor" format="color" /> <attr name="tabLayoutWithExpandedCollapsingToolbarTextColor" format="color"/>
<attr name="tabLayoutWithExpandedCollapsingToolbarTabIndicator" format="color" /> <attr name="tabLayoutWithExpandedCollapsingToolbarTabIndicator" format="color"/>
<attr name="tabLayoutWithCollapsedCollapsingToolbarTabBackground" format="color"/> <attr name="tabLayoutWithCollapsedCollapsingToolbarTabBackground" format="color"/>
<attr name="tabLayoutWithCollapsedCollapsingToolbarTextColor" format="color" /> <attr name="tabLayoutWithCollapsedCollapsingToolbarTextColor" format="color"/>
<attr name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator" format="color" /> <attr name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator" format="color"/>
<attr name="navBarColor" format="color" /> <attr name="navBarColor" format="color"/>
<attr name="upvoted" format="color" /> <attr name="upvoted" format="color"/>
<attr name="downvoted" format="color" /> <attr name="downvoted" format="color"/>
<attr name="post_type" format="color" /> <attr name="post_type" format="color"/>
<attr name="spoilerColor" format="color" /> <attr name="spoilerColor" format="color"/>
<attr name="nsfwColor" format="color" /> <attr name="nsfwColor" format="color"/>
<attr name="flairColor" format="color" /> <attr name="flairColor" format="color"/>
<attr name="archivedTint" format="color" /> <attr name="archivedTint" format="color"/>
<attr name="lockedIconTint" format="color" /> <attr name="lockedIconTint" format="color"/>
<attr name="crosspost" format="color" /> <attr name="crosspost" format="color"/>
<attr name="stickiedPost" format="color" /> <attr name="stickiedPost" format="color"/>
<attr name="subscribed" format="color" /> <attr name="subscribed" format="color"/>
<attr name="unsubscribed" format="color" /> <attr name="unsubscribed" format="color"/>
<attr name="username" format="color" /> <attr name="username" format="color"/>
<attr name="subreddit" format="color" /> <attr name="subreddit" format="color"/>
<attr name="authorFlairTextColor" format="color" /> <attr name="authorFlairTextColor" format="color"/>
<attr name="submitter" format="color" /> <attr name="submitter" format="color"/>
<attr name="moderator" format="color" /> <attr name="moderator" format="color"/>
<attr name="notificationIconColor" format="color"/>
<attr name="singleCommentThreadBackgroundColor" format="color"/>
<attr name="unreadMessageBackgroundColor" format="color"/>
<attr name="dividerColor" format="color"/>
<attr name="noPreviewLinkBackgroundColor" format="color"/>
<attr name="voteAndReplyUnavailableVoteButtonColor" format="color"/>
<attr name="commentVerticalBarColor1" format="color"/>
<attr name="commentVerticalBarColor2" format="color"/>
<attr name="commentVerticalBarColor3" format="color"/>
<attr name="commentVerticalBarColor4" format="color"/>
<attr name="commentVerticalBarColor5" format="color"/>
<attr name="commentVerticalBarColor6" format="color"/>
<attr name="commentVerticalBarColor7" format="color"/>
</declare-styleable> </declare-styleable>
</resources> </resources>

View File

@ -8,13 +8,13 @@
<color name="gold">#FFC107</color> <color name="gold">#FFC107</color>
<color name="primaryTextColor">#000000</color> <!--<color name="primaryTextColor">#000000</color>-->
<!--<color name="colorPrimaryDarkDayNightTheme">@color/colorPrimaryDark</color>--> <!--<color name="colorPrimaryDarkDayNightTheme">@color/colorPrimaryDark</color>-->
<color name="dividerColor">#E0E0E0</color> <!--<color name="dividerColor">#E0E0E0</color>-->
<color name="grey">#E0E0E0</color> <!--<color name="grey">#E0E0E0</color>-->
<color name="backgroundColor">#FFFFFF</color> <color name="backgroundColor">#FFFFFF</color>
@ -22,17 +22,17 @@
<color name="backgroundColorPrimaryDark">@color/colorPrimaryDark</color>--> <color name="backgroundColorPrimaryDark">@color/colorPrimaryDark</color>-->
<color name="backgroundColorInverse">#000000</color> <color name="playButtonBackgroundColor">#000000</color>
<color name="roundedBottomSheetPrimaryBackground">#FFFFFF</color> <color name="roundedBottomSheetPrimaryBackground">#FFFFFF</color>
<color name="roundedBottomSheetPrimaryNavigationBarColor">@android:color/black</color> <color name="roundedBottomSheetPrimaryNavigationBarColor">#000000</color>
<!--<color name="upvoted">#E91E63</color> <!--<color name="upvoted">#E91E63</color>
<color name="downvoted">#007DDE</color>--> <color name="downvoted">#007DDE</color>-->
<color name="voteAndReplyUnavailableVoteButtonColor">#F0F0F0</color> <!--<color name="voteAndReplyUnavailableVoteButtonColor">#F0F0F0</color>-->
<!--<color name="tabLayoutWithExpandedCollapsingToolbarTextColor">@color/colorPrimary</color> <!--<color name="tabLayoutWithExpandedCollapsingToolbarTextColor">@color/colorPrimary</color>
@ -46,29 +46,29 @@
<color name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator">@color/tabLayoutWithCollapsedCollapsingToolbarTextColor</color>--> <color name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator">@color/tabLayoutWithCollapsedCollapsingToolbarTextColor</color>-->
<color name="navBarColor">#FFFFFF</color> <!--<color name="navBarColor">#FFFFFF</color>-->
<color name="cardViewBackgroundColor">#FFFFFF</color> <!--<color name="cardViewBackgroundColor">#FFFFFF</color>-->
<color name="singleCommentThreadBackgroundColor">#B3E5F9</color> <!--<color name="singleCommentThreadBackgroundColor">#B3E5F9</color>-->
<color name="unreadMessageBackgroundColor">#B3E5F9</color> <!--<color name="unreadMessageBackgroundColor">#B3E5F9</color>-->
<!--<color name="archivedTint">#B4009F</color> <!--<color name="archivedTint">#B4009F</color>
<color name="lockedIconTint">#EE7302</color>--> <color name="lockedIconTint">#EE7302</color>-->
<color name="notificationIconColor">@color/colorPrimary</color> <!--<color name="notificationIconColor">@color/colorPrimary</color>-->
<color name="defaultTextColor">#8A000000</color> <!--<color name="defaultTextColor">#8A000000</color>-->
<color name="commentVerticalBar1">#1565C0</color> <!--<color name="commentVerticalBar1">#1565C0</color>
<color name="commentVerticalBar2">#EE02BE</color> <color name="commentVerticalBar2">#EE02BE</color>
<color name="commentVerticalBar3">#02DFEE</color> <color name="commentVerticalBar3">#02DFEE</color>
<color name="commentVerticalBar4">#EED502</color> <color name="commentVerticalBar4">#EED502</color>
<color name="commentVerticalBar5">#EE0220</color> <color name="commentVerticalBar5">#EE0220</color>
<color name="commentVerticalBar6">#02EE6E</color> <color name="commentVerticalBar6">#02EE6E</color>
<color name="commentVerticalBar7">#EE4602</color> <color name="commentVerticalBar7">#EE4602</color>-->
<!--<color name="toolbarAndTabBackgroundColor">@color/colorPrimary</color> <!--<color name="toolbarAndTabBackgroundColor">@color/colorPrimary</color>

View File

@ -308,7 +308,7 @@
<string name="settings_mute_video_title">Mute Video</string> <string name="settings_mute_video_title">Mute Video</string>
<string name="settings_confirm_to_exit">Confirm to Exit</string> <string name="settings_confirm_to_exit">Confirm to Exit</string>
<string name="settings_show_top_level_comments_first_title">Show Top-level Comments First</string> <string name="settings_show_top_level_comments_first_title">Show Top-level Comments First</string>
<string name="settings_show_comment_divider_title">Show comment divider</string> <string name="settings_show_comment_divider_title">Show Comment Divider</string>
<string name="settings_show_absolute_number_of_votes_title">Show Absolute Number of Votes</string> <string name="settings_show_absolute_number_of_votes_title">Show Absolute Number of Votes</string>
<string name="settings_show_elapsed_time">Show Elapsed Time in Posts and Comments</string> <string name="settings_show_elapsed_time">Show Elapsed Time in Posts and Comments</string>
<string name="settings_default_post_layout">Default Post Layout</string> <string name="settings_default_post_layout">Default Post Layout</string>

View File

@ -69,7 +69,7 @@
</style> </style>
<style name="MaterialAlertDialogNegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog"> <style name="MaterialAlertDialogNegativeButtonStyle" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">@color/primaryTextColor</item> <item name="android:textColor">?attr/primaryTextColor</item>
</style> </style>
<style name="MaterialAlertDialogTitleTextStyle" parent="MaterialAlertDialog.MaterialComponents.Title.Text"> <style name="MaterialAlertDialogTitleTextStyle" parent="MaterialAlertDialog.MaterialComponents.Title.Text">
@ -83,7 +83,7 @@
<style name="PreferenceActivityTheme" parent="AppTheme.NoActionBar"> <style name="PreferenceActivityTheme" parent="AppTheme.NoActionBar">
<item name="android:textAppearanceListItem">@style/PreferenceTitleTextStyle</item> <item name="android:textAppearanceListItem">@style/PreferenceTitleTextStyle</item>
<item name="android:textAppearanceListItemSecondary">@style/PreferenceSubtitleTextStyle</item> <item name="android:textAppearanceListItemSecondary">@style/PreferenceSubtitleTextStyle</item>
<item name="android:textColorPrimary">@color/primaryTextColor</item> <item name="android:textColorPrimary">?attr/primaryTextColor</item>
<item name="buttonBarPositiveButtonStyle">@style/MaterialAlertDialogPositiveButtonStyle</item> <item name="buttonBarPositiveButtonStyle">@style/MaterialAlertDialogPositiveButtonStyle</item>
<item name="buttonBarNegativeButtonStyle">@style/MaterialAlertDialogNegativeButtonStyle</item> <item name="buttonBarNegativeButtonStyle">@style/MaterialAlertDialogNegativeButtonStyle</item>
<item name="alertDialogTheme">@style/ListPreferenceStyle</item> <item name="alertDialogTheme">@style/ListPreferenceStyle</item>
@ -91,7 +91,7 @@
<style name="PreferenceTitleTextStyle"> <style name="PreferenceTitleTextStyle">
<item name="android:textSize">?attr/font_16</item> <item name="android:textSize">?attr/font_16</item>
<item name="android:textColor">@color/primaryTextColor</item> <item name="android:textColor">?attr/primaryTextColor</item>
</style> </style>
<style name="PreferenceSubtitleTextStyle"> <style name="PreferenceSubtitleTextStyle">
@ -262,9 +262,11 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimaryLightTheme">@color/colorPrimary</item> <item name="colorPrimaryLightTheme">@color/colorPrimary</item>
<item name="primaryTextColor">#000000</item>
<item name="secondaryTextColor">#8A000000</item>
<item name="backgroundColor">@color/backgroundColor</item> <item name="backgroundColor">@color/backgroundColor</item>
<item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item> <item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item>
<item name="cardViewBackgroundColor">@color/cardViewBackgroundColor</item> <item name="cardViewBackgroundColor">#FFFFFF</item>
<item name="toolbarAndTabBackgroundColor">@color/colorPrimary</item> <item name="toolbarAndTabBackgroundColor">@color/colorPrimary</item>
<item name="circularProgressBarBackground">#FFFFFF</item> <item name="circularProgressBarBackground">#FFFFFF</item>
<item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">#FFFFFF</item> <item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">#FFFFFF</item>
@ -291,6 +293,19 @@
<item name="authorFlairTextColor">#EE02C4</item> <item name="authorFlairTextColor">#EE02C4</item>
<item name="submitter">#EE8A02</item> <item name="submitter">#EE8A02</item>
<item name="moderator">#00BA81</item> <item name="moderator">#00BA81</item>
<item name="notificationIconColor">@color/colorPrimary</item>
<item name="singleCommentThreadBackgroundColor">#B3E5F9</item>
<item name="unreadMessageBackgroundColor">#B3E5F9</item>
<item name="dividerColor">#E0E0E0</item>
<item name="noPreviewLinkBackgroundColor">#E0E0E0</item>
<item name="voteAndReplyUnavailableVoteButtonColor">#F0F0F0</item>
<item name="commentVerticalBarColor1">#1565C0</item>
<item name="commentVerticalBarColor2">#EE02BE</item>
<item name="commentVerticalBarColor3">#02DFEE</item>
<item name="commentVerticalBarColor4">#EED502</item>
<item name="commentVerticalBarColor5">#EE0220</item>
<item name="commentVerticalBarColor6">#02EE6E</item>
<item name="commentVerticalBarColor7">#EE4602</item>
</style> </style>
<style name="Theme.Default.NormalDark"> <style name="Theme.Default.NormalDark">
@ -298,9 +313,11 @@
<item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimaryLightTheme">#1565C0</item> <item name="colorPrimaryLightTheme">#1565C0</item>
<item name="primaryTextColor">#FFFFFF</item>
<item name="secondaryTextColor">#B3FFFFFF</item>
<item name="backgroundColor">@color/backgroundColor</item> <item name="backgroundColor">@color/backgroundColor</item>
<item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item> <item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item>
<item name="cardViewBackgroundColor">@color/cardViewBackgroundColor</item> <item name="cardViewBackgroundColor">#242424</item>
<item name="toolbarAndTabBackgroundColor">#282828</item> <item name="toolbarAndTabBackgroundColor">#282828</item>
<item name="circularProgressBarBackground">@color/colorPrimary</item> <item name="circularProgressBarBackground">@color/colorPrimary</item>
<item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">@color/backgroundColor</item> <item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">@color/backgroundColor</item>
@ -327,6 +344,19 @@
<item name="authorFlairTextColor">#EE02C4</item> <item name="authorFlairTextColor">#EE02C4</item>
<item name="submitter">#EE8A02</item> <item name="submitter">#EE8A02</item>
<item name="moderator">#00BA81</item> <item name="moderator">#00BA81</item>
<item name="notificationIconColor">#1565C0</item>
<item name="singleCommentThreadBackgroundColor">#123E77</item>
<item name="unreadMessageBackgroundColor">#123E77</item>
<item name="dividerColor">#69666C</item>
<item name="noPreviewLinkBackgroundColor">#424242</item>
<item name="voteAndReplyUnavailableVoteButtonColor">#3C3C3C</item>
<item name="commentVerticalBarColor1">#1565C0</item>
<item name="commentVerticalBarColor2">#C300B3</item>
<item name="commentVerticalBarColor3">#00B8DA</item>
<item name="commentVerticalBarColor4">#EDCA00</item>
<item name="commentVerticalBarColor5">#EE0219</item>
<item name="commentVerticalBarColor6">#00B925</item>
<item name="commentVerticalBarColor7">#EE4602</item>
</style> </style>
<style name="Theme.Default.AmoledDark"> <style name="Theme.Default.AmoledDark">
@ -334,6 +364,8 @@
<item name="colorPrimaryDark">#000000</item> <item name="colorPrimaryDark">#000000</item>
<item name="colorAccent">@color/colorAccent</item> <item name="colorAccent">@color/colorAccent</item>
<item name="colorPrimaryLightTheme">#1565C0</item> <item name="colorPrimaryLightTheme">#1565C0</item>
<item name="primaryTextColor">#FFFFFF</item>
<item name="secondaryTextColor">#B3FFFFFF</item>
<item name="backgroundColor">#000000</item> <item name="backgroundColor">#000000</item>
<item name="roundedBottomSheetPrimaryBackground">#000000</item> <item name="roundedBottomSheetPrimaryBackground">#000000</item>
<item name="cardViewBackgroundColor">#000000</item> <item name="cardViewBackgroundColor">#000000</item>
@ -363,6 +395,70 @@
<item name="authorFlairTextColor">#EE02C4</item> <item name="authorFlairTextColor">#EE02C4</item>
<item name="submitter">#EE8A02</item> <item name="submitter">#EE8A02</item>
<item name="moderator">#00BA81</item> <item name="moderator">#00BA81</item>
<item name="notificationIconColor">#1565C0</item>
<item name="singleCommentThreadBackgroundColor">#123E77</item>
<item name="unreadMessageBackgroundColor">#123E77</item>
<item name="dividerColor">#69666C</item>
<item name="noPreviewLinkBackgroundColor">#424242</item>
<item name="voteAndReplyUnavailableVoteButtonColor">#3C3C3C</item>
<item name="commentVerticalBarColor1">#1565C0</item>
<item name="commentVerticalBarColor2">#C300B3</item>
<item name="commentVerticalBarColor3">#00B8DA</item>
<item name="commentVerticalBarColor4">#EDCA00</item>
<item name="commentVerticalBarColor5">#EE0219</item>
<item name="commentVerticalBarColor6">#00B925</item>
<item name="commentVerticalBarColor7">#EE4602</item>
</style>
<style name="Theme.Purple">
<item name="colorPrimary">#9C27B0</item>
<item name="colorPrimaryDark">#7B1FA2</item>
<item name="colorAccent">#03A9F4</item>
<item name="colorPrimaryLightTheme">#9C27B0</item>
<item name="primaryTextColor">#000000</item>
<item name="secondaryTextColor">#8A000000</item>
<item name="backgroundColor">@color/backgroundColor</item>
<item name="roundedBottomSheetPrimaryBackground">@color/roundedBottomSheetPrimaryBackground</item>
<item name="cardViewBackgroundColor">#FFFFFF</item>
<item name="toolbarAndTabBackgroundColor">#9C27B0</item>
<item name="circularProgressBarBackground">#FFFFFF</item>
<item name="tabLayoutWithExpandedCollapsingToolbarTabBackground">#FFFFFF</item>
<item name="tabLayoutWithExpandedCollapsingToolbarTextColor">#9C27B0</item>
<item name="tabLayoutWithExpandedCollapsingToolbarTabIndicator">#9C27B0</item>
<item name="tabLayoutWithCollapsedCollapsingToolbarTabBackground">#9C27B0</item>
<item name="tabLayoutWithCollapsedCollapsingToolbarTextColor">#FFFFFF</item>
<item name="tabLayoutWithCollapsedCollapsingToolbarTabIndicator">#FFFFFF</item>
<item name="navBarColor">@color/backgroundColor</item>
<item name="upvoted">#E91E63</item>
<item name="downvoted">#007DDE</item>
<item name="post_type">#7B1FA2</item>
<item name="spoilerColor">#EE02EB</item>
<item name="nsfwColor">#03A9F4</item>
<item name="flairColor">#00AA8C</item>
<item name="archivedTint">#B4009F</item>
<item name="lockedIconTint">#EE7302</item>
<item name="crosspost">#03A9F4</item>
<item name="stickiedPost">#7B1FA2</item>
<item name="subscribed">#03A9F4</item>
<item name="unsubscribed">#7B1FA2</item>
<item name="username">#7B1FA2</item>
<item name="subreddit">#03A9F4</item>
<item name="authorFlairTextColor">#EE02C4</item>
<item name="submitter">#EE8A02</item>
<item name="moderator">#00BA81</item>
<item name="notificationIconColor">#9C27B0</item>
<item name="singleCommentThreadBackgroundColor">#B3E5F9</item>
<item name="unreadMessageBackgroundColor">#B3E5F9</item>
<item name="dividerColor">#E0E0E0</item>
<item name="noPreviewLinkBackgroundColor">#E0E0E0</item>
<item name="voteAndReplyUnavailableVoteButtonColor">#F0F0F0</item>
<item name="commentVerticalBarColor1">#1565C0</item>
<item name="commentVerticalBarColor2">#EE02BE</item>
<item name="commentVerticalBarColor3">#02DFEE</item>
<item name="commentVerticalBarColor4">#EED502</item>
<item name="commentVerticalBarColor5">#EE0220</item>
<item name="commentVerticalBarColor6">#02EE6E</item>
<item name="commentVerticalBarColor7">#EE4602</item>
</style> </style>
</resources> </resources>