diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/BaseActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/BaseActivity.java index c7a2abf2..0902a493 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/BaseActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/BaseActivity.java @@ -34,7 +34,7 @@ public abstract class BaseActivity extends AppCompatActivity { switch (themeType) { case 0: AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_NO); - getTheme().applyStyle(R.style.Theme_Default, true); + getTheme().applyStyle(R.style.Theme_Purple, true); break; case 1: AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_YES); @@ -51,7 +51,7 @@ public abstract class BaseActivity extends AppCompatActivity { AppCompatDelegate.setDefaultNightMode(MODE_NIGHT_AUTO_BATTERY); } 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 { if(mSharedPreferences.getBoolean(SharedPreferencesUtils.AMOLED_DARK_KEY, false)) { getTheme().applyStyle(R.style.Theme_Default_AmoledDark, true); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java index 5faaa174..84f68c4d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/CommentActivity.java @@ -20,7 +20,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.Toolbar; import androidx.coordinatorlayout.widget.CoordinatorLayout; -import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -53,6 +52,7 @@ import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SendComment; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; public class CommentActivity extends BaseActivity { @@ -146,7 +146,7 @@ public class CommentActivity extends BaseActivity { if (parentBody != null && !parentBody.equals("")) { contentMarkdownRecyclerView.setVisibility(View.VISIBLE); contentMarkdownRecyclerView.setNestedScrollingEnabled(false); - int markdownColor = ContextCompat.getColor(this, R.color.defaultTextColor); + int markdownColor = Utils.getAttributeColor(this, R.attr.secondaryTextColor); Markwon postBodyMarkwon = Markwon.builder(this) .usePlugin(new AbstractMarkwonPlugin() { @Override diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java index d5c9fff1..0a2553de 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/LinkResolverActivity.java @@ -22,6 +22,7 @@ import javax.inject.Inject; import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; 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_FOLLOW_SYSTEM; @@ -234,7 +235,7 @@ public class LinkResolverActivity extends AppCompatActivity { CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); // add share action to menu list builder.addDefaultShareMenuItem(); - builder.setToolbarColor(getResources().getColor(R.color.colorPrimary)); + builder.setToolbarColor(Utils.getAttributeColor(this, R.attr.colorPrimary)); CustomTabsIntent customTabsIntent = builder.build(); customTabsIntent.intent.setPackage(resolveInfos.get(0).activityInfo.packageName); if (uri.getScheme() == null) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MultiRedditListingActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MultiRedditListingActivity.java index 5ac8e9de..8ad32af2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MultiRedditListingActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/MultiRedditListingActivity.java @@ -6,7 +6,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.MenuItem; import android.view.View; import android.view.ViewGroup; @@ -47,6 +46,7 @@ import ml.docilealligator.infinityforreddit.MultiReddit.MultiRedditViewModel; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; public class MultiRedditListingActivity extends BaseActivity { @@ -147,11 +147,8 @@ public class MultiRedditListingActivity extends BaseActivity { getSupportActionBar().setDisplayHomeAsUpEnabled(true); mSwipeRefreshLayout.setOnRefreshListener(this::loadMultiReddits); - - TypedValue typedValue = new TypedValue(); - getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent)); if (savedInstanceState != null) { mInsertSuccess = savedInstanceState.getBoolean(INSERT_MULTI_REDDIT_STATE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java index ee68d38d..b5babcf2 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostImageActivity.java @@ -130,6 +130,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF private boolean loadSubredditIconSuccessful = true; private boolean isPosting; private Uri imageUri; + private int primaryTextColor; private int flairColor; private int spoilerColor; private int nsfwColor; @@ -161,6 +162,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); + primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); @@ -192,7 +194,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF } if (subredditName != null) { - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); if (!loadSubredditIconSuccessful) { @@ -224,7 +226,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF loadSubredditIconSuccessful = false; subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditSelected = true; - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); loadSubredditIcon(); } else { @@ -507,7 +509,7 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF subredditSelected = true; subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER); - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); displaySubredditIcon(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java index 094a7757..d2ed17f9 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostLinkActivity.java @@ -104,6 +104,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr private boolean subredditIsUser; private boolean loadSubredditIconSuccessful = true; private boolean isPosting; + private int primaryTextColor; private int flairColor; private int spoilerColor; private int nsfwColor; @@ -135,6 +136,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); + primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); @@ -160,7 +162,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr isNSFW = savedInstanceState.getBoolean(IS_NSFW_STATE); if (subredditName != null) { - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); if (!loadSubredditIconSuccessful) { @@ -192,7 +194,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr loadSubredditIconSuccessful = false; subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditSelected = true; - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); loadSubredditIcon(); @@ -427,7 +429,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr subredditSelected = true; subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER); - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); displaySubredditIcon(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java index 4f10e848..c2f5f9a0 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostTextActivity.java @@ -104,6 +104,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr private boolean subredditIsUser; private boolean loadSubredditIconSuccessful = true; private boolean isPosting; + private int primaryTextColor; private int flairColor; private int spoilerColor; private int nsfwColor; @@ -135,6 +136,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); + primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); @@ -160,7 +162,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr isNSFW = savedInstanceState.getBoolean(IS_NSFW_STATE); if (subredditName != null) { - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); if (!loadSubredditIconSuccessful) { @@ -192,7 +194,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr loadSubredditIconSuccessful = false; subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditSelected = true; - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); loadSubredditIcon(); @@ -427,7 +429,7 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr subredditSelected = true; subredditIsUser = data.getExtras().getBoolean(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER); - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); displaySubredditIcon(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java index 91ea4157..7b887f20 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/PostVideoActivity.java @@ -136,6 +136,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF private boolean loadSubredditIconSuccessful = true; private boolean isPosting; private boolean wasPlaying; + private int primaryTextColor; private int flairColor; private int spoilerColor; private int nsfwColor; @@ -175,6 +176,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF mPostingSnackbar = Snackbar.make(coordinatorLayout, R.string.posting, Snackbar.LENGTH_INDEFINITE); + primaryTextColor = Utils.getAttributeColor(this, R.attr.primaryTextColor); flairColor = Utils.getAttributeColor(this, R.attr.flairColor); spoilerColor = Utils.getAttributeColor(this, R.attr.spoilerColor); nsfwColor = Utils.getAttributeColor(this, R.attr.nsfwColor); @@ -205,7 +207,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF } if (subredditName != null) { - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); flairTextView.setVisibility(View.VISIBLE); if (!loadSubredditIconSuccessful) { @@ -237,7 +239,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF loadSubredditIconSuccessful = false; subredditName = getIntent().getStringExtra(EXTRA_SUBREDDIT_NAME); subredditSelected = true; - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); loadSubredditIcon(); } else { @@ -528,7 +530,7 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF subredditSelected = true; subredditIsUser = data.getBooleanExtra(SubredditSelectionActivity.EXTRA_RETURN_SUBREDDIT_IS_USER, false); - subredditNameTextView.setTextColor(resources.getColor(R.color.primaryTextColor)); + subredditNameTextView.setTextColor(primaryTextColor); subredditNameTextView.setText(subredditName); displaySubredditIcon(); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMessageActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMessageActivity.java index 9007e810..92450d0c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMessageActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewMessageActivity.java @@ -5,7 +5,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.Menu; import android.view.MenuItem; import android.view.View; @@ -50,6 +49,7 @@ import ml.docilealligator.infinityforreddit.NetworkState; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; public class ViewMessageActivity extends BaseActivity { @@ -255,11 +255,8 @@ public class ViewMessageActivity extends BaseActivity { }); mSwipeRefreshLayout.setOnRefreshListener(this::onRefresh); - - TypedValue typedValue = new TypedValue(); - getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent)); } private void showErrorView(int stringResId) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java index 4d118525..1842a59d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewPostDetailActivity.java @@ -6,7 +6,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.KeyEvent; import android.view.Menu; import android.view.MenuItem; @@ -82,6 +81,7 @@ import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SortTypeSelectionCallback; import ml.docilealligator.infinityforreddit.Utils.RedditUtils; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; @@ -353,11 +353,8 @@ public class ViewPostDetailActivity extends BaseActivity implements FlairBottomS } mSwipeRefreshLayout.setOnRefreshListener(() -> refresh(true, true)); - - TypedValue typedValue = new TypedValue(); - getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent)); mSmoothScroller = new LinearSmoothScroller(this) { @Override diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSidebarActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSidebarActivity.java index 8f9d9fc4..cb11bbcc 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSidebarActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Activity/ViewSidebarActivity.java @@ -22,7 +22,6 @@ import android.widget.Toast; import androidx.annotation.NonNull; import androidx.appcompat.widget.Toolbar; -import androidx.core.content.ContextCompat; import androidx.lifecycle.ViewModelProvider; import androidx.recyclerview.widget.LinearLayoutManager; 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.SubredditViewModel; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; public class ViewSidebarActivity extends BaseActivity { @@ -66,7 +66,7 @@ public class ViewSidebarActivity extends BaseActivity { @BindView(R.id.toolbar_view_sidebar_activity) Toolbar toolbar; @BindView(R.id.swipe_refresh_layout_view_sidebar_activity) - SwipeRefreshLayout swipeRefreshLayout; + SwipeRefreshLayout mSwipeRefreshLayout; @BindView(R.id.markdown_recycler_view_view_sidebar_activity) RecyclerView markdownRecyclerView; @Inject @@ -151,7 +151,7 @@ public class ViewSidebarActivity extends BaseActivity { setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); - int markdownColor = ContextCompat.getColor(this, R.color.defaultTextColor); + int markdownColor = Utils.getAttributeColor(this, R.attr.secondaryTextColor); Markwon markwon = Markwon.builder(this) .usePlugin(new AbstractMarkwonPlugin() { @Override @@ -204,25 +204,23 @@ public class ViewSidebarActivity extends BaseActivity { } }); - TypedValue typedValue = new TypedValue(); - getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - swipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - swipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); - swipeRefreshLayout.setOnRefreshListener(this::fetchSubredditData); + mSwipeRefreshLayout.setOnRefreshListener(this::fetchSubredditData); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(this, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(this, R.attr.colorAccent)); } private void fetchSubredditData() { - swipeRefreshLayout.setRefreshing(true); + mSwipeRefreshLayout.setRefreshing(true); FetchSubredditData.fetchSubredditData(mRetrofit, subredditName, new FetchSubredditData.FetchSubredditDataListener() { @Override public void onFetchSubredditDataSuccess(SubredditData subredditData, int nCurrentOnlineSubscribers) { - swipeRefreshLayout.setRefreshing(false); - new InsertSubredditDataAsyncTask(mRedditDataRoomDatabase, subredditData, () -> swipeRefreshLayout.setRefreshing(false)).execute(); + mSwipeRefreshLayout.setRefreshing(false); + new InsertSubredditDataAsyncTask(mRedditDataRoomDatabase, subredditData, () -> mSwipeRefreshLayout.setRefreshing(false)).execute(); } @Override public void onFetchSubredditDataFail() { - swipeRefreshLayout.setRefreshing(false); + mSwipeRefreshLayout.setRefreshing(false); Toast.makeText(ViewSidebarActivity.this, R.string.cannot_fetch_sidebar, Toast.LENGTH_SHORT).show(); } }); @@ -240,7 +238,7 @@ public class ViewSidebarActivity extends BaseActivity { finish(); return true; } else if (item.getItemId() == R.id.action_refresh_view_sidebar_activity) { - if (!swipeRefreshLayout.isRefreshing()) { + if (!mSwipeRefreshLayout.isRefreshing()) { fetchSubredditData(); } return true; diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java index 7aa282f1..ab7c0b21 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Adapter/CommentAndPostRecyclerViewAdapter.java @@ -26,7 +26,6 @@ import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.constraintlayout.widget.ConstraintLayout; import androidx.constraintlayout.widget.ConstraintSet; -import androidx.core.content.ContextCompat; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; @@ -129,12 +128,22 @@ public class CommentAndPostRecyclerViewAdapter extends RecyclerView.Adapter mAdapter.setNetworkState(networkState)); mSwipeRefreshLayout.setOnRefreshListener(() -> mCommentViewModel.refresh()); - - TypedValue typedValue = new TypedValue(); - mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent)); } public void changeSortType(SortType sortType) { diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java index 93f2b36b..e3ec8f91 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/FollowedUsersListingFragment.java @@ -6,7 +6,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -34,6 +33,7 @@ import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SubscribedUserDatabase.SubscribedUserViewModel; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; @@ -92,10 +92,8 @@ public class FollowedUsersListingFragment extends Fragment implements FragmentCo if (mActivity instanceof SubscribedThingListingActivity) { mSwipeRefreshLayout.setOnRefreshListener(() -> ((SubscribedThingListingActivity) mActivity).loadSubscriptions(true)); - TypedValue typedValue = new TypedValue(); - mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent)); } else { mSwipeRefreshLayout.setEnabled(false); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java index cf434238..66a70c74 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/PostFragment.java @@ -11,7 +11,6 @@ import android.os.Build; import android.os.Bundle; import android.os.CountDownTimer; import android.os.Handler; -import android.util.TypedValue; import android.view.KeyEvent; import android.view.LayoutInflater; import android.view.View; @@ -70,6 +69,7 @@ import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; @@ -262,11 +262,8 @@ public class PostFragment extends Fragment implements FragmentCommunicator { }; mSwipeRefreshLayout.setOnRefreshListener(this::refresh); - - TypedValue typedValue = new TypedValue(); - activity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(activity, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(activity, R.attr.colorAccent)); if (savedInstanceState != null) { int recyclerViewPosition = savedInstanceState.getInt(RECYCLER_VIEW_POSITION_STATE); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java index 1709fed9..91698cb6 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubredditListingFragment.java @@ -9,7 +9,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -43,6 +42,7 @@ import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.SubredditListingViewModel; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; @@ -175,11 +175,8 @@ public class SubredditListingFragment extends Fragment implements FragmentCommun }); mSwipeRefreshLayout.setOnRefreshListener(() -> mSubredditListingViewModel.refresh()); - - TypedValue typedValue = new TypedValue(); - mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent)); return rootView; } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java index 704dab43..076ac28c 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/SubscribedSubredditsListingFragment.java @@ -7,7 +7,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -37,6 +36,7 @@ import ml.docilealligator.infinityforreddit.Infinity; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SubscribedSubredditDatabase.SubscribedSubredditViewModel; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; @@ -98,10 +98,8 @@ public class SubscribedSubredditsListingFragment extends Fragment implements Fra if (mActivity instanceof SubscribedThingListingActivity) { mSwipeRefreshLayout.setOnRefreshListener(() -> ((SubscribedThingListingActivity) mActivity).loadSubscriptions(true)); - TypedValue typedValue = new TypedValue(); - mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent)); } else { mSwipeRefreshLayout.setEnabled(false); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java index 3e580e09..3baf7f8d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Fragment/UserListingFragment.java @@ -8,7 +8,6 @@ import android.content.res.Configuration; import android.content.res.Resources; import android.os.Build; import android.os.Bundle; -import android.util.TypedValue; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; @@ -40,6 +39,7 @@ import ml.docilealligator.infinityforreddit.RedditDataRoomDatabase; import ml.docilealligator.infinityforreddit.SortType; import ml.docilealligator.infinityforreddit.UserListingViewModel; import ml.docilealligator.infinityforreddit.Utils.SharedPreferencesUtils; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; @@ -155,11 +155,8 @@ public class UserListingFragment extends Fragment implements FragmentCommunicato }); mSwipeRefreshLayout.setOnRefreshListener(() -> mUserListingViewModel.refresh()); - - TypedValue typedValue = new TypedValue(); - mActivity.getTheme().resolveAttribute(R.attr.cardViewBackgroundColor, typedValue, true); - mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(typedValue.data); - mSwipeRefreshLayout.setColorSchemeResources(R.color.colorAccent); + mSwipeRefreshLayout.setProgressBackgroundColorSchemeColor(Utils.getAttributeColor(mActivity, R.attr.cardViewBackgroundColor)); + mSwipeRefreshLayout.setColorSchemeColors(Utils.getAttributeColor(mActivity, R.attr.colorAccent)); return rootView; } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java b/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java index 6a3b9acb..2e04377d 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/NotificationUtils.java @@ -7,6 +7,8 @@ import android.content.Context; import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationManagerCompat; +import ml.docilealligator.infinityforreddit.Utils.Utils; + public class NotificationUtils { public static final String CHANNEL_SUBMIT_POST = "Submit Post"; static final String CHANNEL_ID_NEW_MESSAGES = "new_messages"; @@ -31,7 +33,7 @@ public class NotificationUtils { .setContentTitle(title) .setContentText(content) .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() .setSummaryText(summary) .bigText(content)) @@ -52,7 +54,7 @@ public class NotificationUtils { //set content text to support devices running API level < 24 .setContentText(content) .setSmallIcon(R.drawable.ic_notification) - .setColor(context.getResources().getColor(R.color.notificationIconColor)) + .setColor(Utils.getAttributeColor(context, R.attr.notificationIconColor)) .setGroup(group) .setGroupSummary(true) .setAutoCancel(true); diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/Service/SubmitPostService.java b/app/src/main/java/ml/docilealligator/infinityforreddit/Service/SubmitPostService.java index 0fd5e8dc..d73ab466 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/Service/SubmitPostService.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/Service/SubmitPostService.java @@ -4,6 +4,7 @@ import android.app.Notification; import android.app.NotificationChannel; import android.app.NotificationManager; import android.app.Service; +import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.drawable.Drawable; @@ -38,6 +39,7 @@ import ml.docilealligator.infinityforreddit.NotificationUtils; import ml.docilealligator.infinityforreddit.Post.Post; import ml.docilealligator.infinityforreddit.R; import ml.docilealligator.infinityforreddit.SubmitPost; +import ml.docilealligator.infinityforreddit.Utils.Utils; import retrofit2.Retrofit; public class SubmitPostService extends Service { @@ -106,27 +108,27 @@ public class SubmitPostService extends Service { if (postType == EXTRA_POST_TEXT_OR_LINK) { content = intent.getStringExtra(EXTRA_CONTENT); 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(); } else if (postType == EXTRA_POST_TYPE_IMAGE) { 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(); } else { 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(); } 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) .setContentTitle(getString(stringResId)) .setContentText(getString(R.string.please_wait)) .setSmallIcon(R.drawable.ic_notification) - .setColor(getResources().getColor(R.color.notificationIconColor)) + .setColor(Utils.getAttributeColor(context, R.attr.notificationIconColor)) .build(); } diff --git a/app/src/main/res/drawable/play_button_round_background.xml b/app/src/main/res/drawable/play_button_round_background.xml index d047c68d..f59e3ab5 100644 --- a/app/src/main/res/drawable/play_button_round_background.xml +++ b/app/src/main/res/drawable/play_button_round_background.xml @@ -2,7 +2,7 @@ - + diff --git a/app/src/main/res/layout/activity_comment.xml b/app/src/main/res/layout/activity_comment.xml index decf27dd..45023334 100644 --- a/app/src/main/res/layout/activity_comment.xml +++ b/app/src/main/res/layout/activity_comment.xml @@ -38,7 +38,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_margin="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/title_font_16" /> + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_create_multi_reddit.xml b/app/src/main/res/layout/activity_create_multi_reddit.xml index 5a06e5ec..62f492bc 100644 --- a/app/src/main/res/layout/activity_create_multi_reddit.xml +++ b/app/src/main/res/layout/activity_create_multi_reddit.xml @@ -41,13 +41,13 @@ android:inputType="textMultiLine" android:textSize="?attr/font_default" android:background="#00000000" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:maxLength="50" /> + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_edit_comment.xml b/app/src/main/res/layout/activity_edit_comment.xml index 37fa4462..88547d89 100644 --- a/app/src/main/res/layout/activity_edit_comment.xml +++ b/app/src/main/res/layout/activity_edit_comment.xml @@ -33,7 +33,7 @@ android:inputType="textCapSentences|textMultiLine" android:textSize="?attr/content_font_18" android:background="#00000000" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" app:layout_behavior="@string/appbar_scrolling_view_behavior" /> \ No newline at end of file diff --git a/app/src/main/res/layout/activity_edit_post.xml b/app/src/main/res/layout/activity_edit_post.xml index 839e90c7..2c6d4757 100644 --- a/app/src/main/res/layout/activity_edit_post.xml +++ b/app/src/main/res/layout/activity_edit_post.xml @@ -40,12 +40,12 @@ android:gravity="top" android:padding="16dp" android:textSize="?attr/title_font_18" - android:textColor="@color/primaryTextColor" /> + android:textColor="?attr/primaryTextColor" /> + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_image.xml b/app/src/main/res/layout/activity_post_image.xml index 92254896..e4acbe5c 100644 --- a/app/src/main/res/layout/activity_post_image.xml +++ b/app/src/main/res/layout/activity_post_image.xml @@ -75,7 +75,7 @@ + android:background="?attr/dividerColor" /> @@ -129,7 +129,7 @@ + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> + android:background="?attr/dividerColor" /> diff --git a/app/src/main/res/layout/activity_post_link.xml b/app/src/main/res/layout/activity_post_link.xml index 7aed97e1..5a314141 100644 --- a/app/src/main/res/layout/activity_post_link.xml +++ b/app/src/main/res/layout/activity_post_link.xml @@ -75,7 +75,7 @@ + android:background="?attr/dividerColor" /> @@ -129,7 +129,7 @@ + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_text.xml b/app/src/main/res/layout/activity_post_text.xml index 5f6d638d..619e2805 100644 --- a/app/src/main/res/layout/activity_post_text.xml +++ b/app/src/main/res/layout/activity_post_text.xml @@ -75,7 +75,7 @@ + android:background="?attr/dividerColor" /> @@ -129,7 +129,7 @@ + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> diff --git a/app/src/main/res/layout/activity_post_video.xml b/app/src/main/res/layout/activity_post_video.xml index 341034a7..b0a321f7 100644 --- a/app/src/main/res/layout/activity_post_video.xml +++ b/app/src/main/res/layout/activity_post_video.xml @@ -75,7 +75,7 @@ + android:background="?attr/dividerColor" /> @@ -129,7 +129,7 @@ + android:background="?attr/dividerColor" /> + android:textColor="?attr/primaryTextColor" /> + android:background="?attr/dividerColor" /> diff --git a/app/src/main/res/layout/activity_search.xml b/app/src/main/res/layout/activity_search.xml index 1dca2b6b..6317ac03 100644 --- a/app/src/main/res/layout/activity_search.xml +++ b/app/src/main/res/layout/activity_search.xml @@ -62,7 +62,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/search_in" - android:textColor="@color/colorAccent" + android:textColor="?attr/colorAccent" android:textSize="?attr/font_default" /> diff --git a/app/src/main/res/layout/activity_view_subreddit_detail.xml b/app/src/main/res/layout/activity_view_subreddit_detail.xml index f36640ce..4b159495 100644 --- a/app/src/main/res/layout/activity_view_subreddit_detail.xml +++ b/app/src/main/res/layout/activity_view_subreddit_detail.xml @@ -61,7 +61,7 @@ android:layout_marginTop="16dp" android:layout_marginBottom="16dp" android:textSize="?attr/font_18" - android:textColor="@color/colorAccent" + android:textColor="?attr/subreddit" android:layout_gravity="center_horizontal"/> @@ -91,7 +91,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentEnd="true" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> @@ -101,7 +101,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:visibility="gone"/> @@ -148,7 +148,7 @@ android:paddingTop="8dp" android:paddingBottom="8dp" android:src="@drawable/ic_subscritptions_bottom_app_bar_24dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:background="?attr/selectableItemBackgroundBorderless" /> diff --git a/app/src/main/res/layout/activity_view_user_detail.xml b/app/src/main/res/layout/activity_view_user_detail.xml index f1d257e6..53e917de 100644 --- a/app/src/main/res/layout/activity_view_user_detail.xml +++ b/app/src/main/res/layout/activity_view_user_detail.xml @@ -75,7 +75,7 @@ android:layout_height="wrap_content" android:layout_marginTop="16dp" android:layout_marginBottom="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:layout_gravity="center_horizontal"/> diff --git a/app/src/main/res/layout/dialog_edit_flair.xml b/app/src/main/res/layout/dialog_edit_flair.xml index 55efc339..cb1f51d1 100644 --- a/app/src/main/res/layout/dialog_edit_flair.xml +++ b/app/src/main/res/layout/dialog_edit_flair.xml @@ -9,7 +9,7 @@ android:layout_height="wrap_content" android:layout_margin="24dp" android:background="#00000000" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:hint="@string/flair" android:maxLength="64" /> @@ -20,7 +20,7 @@ android:layout_marginStart="24dp" android:layout_marginEnd="24dp" android:text="@string/only_allow_64_chars" - android:textColor="@color/colorAccent" + android:textColor="?attr/colorAccent" android:textSize="?attr/font_default" /> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml index 397d8439..d60fe273 100644 --- a/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_comment_more_bottom_sheet.xml @@ -23,7 +23,7 @@ android:paddingEnd="32dp" android:paddingBottom="16dp" android:text="@string/edit" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:visibility="gone" /> @@ -41,7 +41,7 @@ android:paddingEnd="32dp" android:paddingBottom="16dp" android:text="@string/delete" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:visibility="gone" /> @@ -60,7 +60,7 @@ android:paddingEnd="32dp" android:paddingBottom="16dp" android:text="@string/share" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> diff --git a/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml b/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml index 43044ca2..3d82d549 100644 --- a/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_copy_text_bottom_sheet.xml @@ -17,7 +17,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/copy_raw_text" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -32,7 +32,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/copy_markdown" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -47,7 +47,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/copy_all_raw_text" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -62,7 +62,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/copy_all_markdown" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" diff --git a/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml index 7f7fae31..23efa55e 100644 --- a/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_comment_sort_type_bottom_sheet.xml @@ -23,7 +23,7 @@ android:paddingEnd="32dp" android:paddingBottom="16dp" android:text="@string/sort_best" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> diff --git a/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml index 1a0f9d0e..bfe273f5 100644 --- a/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_layot_bottom_sheet.xml @@ -24,7 +24,7 @@ android:paddingEnd="32dp" android:paddingBottom="16dp" android:text="@string/post_layout_card" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> diff --git a/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml index a21d1a21..2497dcb0 100644 --- a/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_post_type_bottom_sheet.xml @@ -20,7 +20,7 @@ android:paddingStart="32dp" android:paddingEnd="32dp" android:text="@string/bottom_sheet_post_text" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_outline_text_24px" android:drawablePadding="48dp" @@ -38,7 +38,7 @@ android:paddingStart="32dp" android:paddingEnd="32dp" android:text="@string/bottom_sheet_post_link" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_link" android:drawablePadding="48dp" @@ -56,7 +56,7 @@ android:paddingStart="32dp" android:paddingEnd="32dp" android:text="@string/bottom_sheet_post_video" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_outline_video_24dp" android:drawablePadding="48dp" @@ -74,7 +74,7 @@ android:paddingStart="32dp" android:paddingEnd="32dp" android:text="@string/bottom_sheet_post_image" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_image_24dp" android:drawablePadding="48dp" diff --git a/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml index 88b5391f..e1c0f8ea 100644 --- a/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_search_post_sort_type_bottom_sheet.xml @@ -15,7 +15,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_relevance" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -30,7 +30,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_hot" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -45,7 +45,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_top" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -60,7 +60,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_new" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -75,7 +75,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_comments" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" diff --git a/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml index 852cfc6c..be3e8030 100644 --- a/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_search_user_and_subreddit_sort_type_bottom_sheet.xml @@ -15,7 +15,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_relevance" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -30,7 +30,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_activity" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" diff --git a/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml b/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml index 0d69a9c6..b842f077 100644 --- a/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_share_link_bottom_sheet.xml @@ -20,7 +20,7 @@ android:paddingStart="32dp" android:paddingEnd="32dp" android:text="@string/share_post_link" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_link" android:drawablePadding="48dp" @@ -38,7 +38,7 @@ android:paddingStart="32dp" android:paddingEnd="32dp" android:text="@string/copy_post_link" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_copy_24dp" android:drawablePadding="48dp" @@ -55,7 +55,7 @@ android:paddingBottom="16dp" android:paddingStart="32dp" android:paddingEnd="32dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_link" android:drawablePadding="48dp" @@ -73,7 +73,7 @@ android:paddingBottom="16dp" android:paddingStart="32dp" android:paddingEnd="32dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:drawableStart="@drawable/ic_copy_24dp" android:drawablePadding="48dp" diff --git a/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml b/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml index 5975b2cc..1c0ab47b 100644 --- a/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_sort_time_bottom_sheet.xml @@ -17,7 +17,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_time_hour" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -32,7 +32,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_time_day" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -47,7 +47,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_time_week" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -62,7 +62,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_time_month" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -77,7 +77,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_time_year" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -92,7 +92,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_time_all_time" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" diff --git a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml index 731f35df..f60fe0bb 100644 --- a/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_sort_type_bottom_sheet.xml @@ -15,7 +15,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_best" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -30,7 +30,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_hot" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -45,7 +45,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_new" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -60,7 +60,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_random" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -75,7 +75,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_rising" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -90,7 +90,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_top" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -105,7 +105,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_controversial" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" diff --git a/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml b/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml index e9746197..dbf56287 100644 --- a/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml +++ b/app/src/main/res/layout/fragment_user_thing_sort_type_bottom_sheet.xml @@ -9,7 +9,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_new" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -24,7 +24,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_hot" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -39,7 +39,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_top" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" @@ -54,7 +54,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:text="@string/sort_controversial" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:paddingTop="16dp" android:paddingBottom="16dp" diff --git a/app/src/main/res/layout/item_acknowledgement.xml b/app/src/main/res/layout/item_acknowledgement.xml index 5e75d492..b1d37f97 100644 --- a/app/src/main/res/layout/item_acknowledgement.xml +++ b/app/src/main/res/layout/item_acknowledgement.xml @@ -14,7 +14,7 @@ android:id="@+id/name_text_view_item_acknowledgement" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_16" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_flair.xml b/app/src/main/res/layout/item_flair.xml index 596da813..abd5c477 100644 --- a/app/src/main/res/layout/item_flair.xml +++ b/app/src/main/res/layout/item_flair.xml @@ -11,7 +11,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:padding="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> diff --git a/app/src/main/res/layout/item_load_comments.xml b/app/src/main/res/layout/item_load_comments.xml index 3558554f..9f994dc7 100644 --- a/app/src/main/res/layout/item_load_comments.xml +++ b/app/src/main/res/layout/item_load_comments.xml @@ -11,7 +11,7 @@ android:layout_height="wrap_content" android:layout_margin="16dp" app:mlpb_progress_stoke_width="3dp" - app:mlpb_progress_color="@color/colorAccent" + app:mlpb_progress_color="?attr/colorAccent" app:mlpb_background_color="?attr/circularProgressBarBackground" android:layout_gravity="center_horizontal"/> diff --git a/app/src/main/res/layout/item_load_more_comments_placeholder.xml b/app/src/main/res/layout/item_load_more_comments_placeholder.xml index 8c0fb3e1..fc33b062 100644 --- a/app/src/main/res/layout/item_load_more_comments_placeholder.xml +++ b/app/src/main/res/layout/item_load_more_comments_placeholder.xml @@ -21,7 +21,7 @@ android:gravity="center" android:padding="8dp" android:text="@string/comment_load_more_comments" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> @@ -30,7 +30,7 @@ android:id="@+id/divider_item_load_more_comments_placeholder" android:layout_width="match_parent" android:layout_height="1dp" - android:background="@color/dividerColor" + android:background="?attr/dividerColor" android:visibility="gone" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_message.xml b/app/src/main/res/layout/item_message.xml index cc822cc0..1ac3b4ed 100644 --- a/app/src/main/res/layout/item_message.xml +++ b/app/src/main/res/layout/item_message.xml @@ -10,7 +10,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="8dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> + android:textColor="?attr/primaryTextColor" /> diff --git a/app/src/main/res/layout/item_nav_drawer_account.xml b/app/src/main/res/layout/item_nav_drawer_account.xml index 35405b82..7cf71e6a 100644 --- a/app/src/main/res/layout/item_nav_drawer_account.xml +++ b/app/src/main/res/layout/item_nav_drawer_account.xml @@ -20,7 +20,7 @@ android:layout_marginStart="16dp" android:layout_marginEnd="16dp" android:layout_gravity="center_vertical" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_nav_drawer_divider.xml b/app/src/main/res/layout/item_nav_drawer_divider.xml index c0e73dff..c27b4d55 100644 --- a/app/src/main/res/layout/item_nav_drawer_divider.xml +++ b/app/src/main/res/layout/item_nav_drawer_divider.xml @@ -2,4 +2,4 @@ \ No newline at end of file + android:background="?attr/dividerColor" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_nav_drawer_menu_item.xml b/app/src/main/res/layout/item_nav_drawer_menu_item.xml index 4e9f911f..4e3cdf5b 100644 --- a/app/src/main/res/layout/item_nav_drawer_menu_item.xml +++ b/app/src/main/res/layout/item_nav_drawer_menu_item.xml @@ -8,5 +8,5 @@ android:focusable="true" android:gravity="center_vertical" android:padding="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" /> \ No newline at end of file diff --git a/app/src/main/res/layout/item_nav_drawer_subscribed_thing.xml b/app/src/main/res/layout/item_nav_drawer_subscribed_thing.xml index 0dc934fe..9c96ea4f 100644 --- a/app/src/main/res/layout/item_nav_drawer_subscribed_thing.xml +++ b/app/src/main/res/layout/item_nav_drawer_subscribed_thing.xml @@ -20,7 +20,7 @@ android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" android:layout_gravity="center_vertical" /> diff --git a/app/src/main/res/layout/item_post.xml b/app/src/main/res/layout/item_post.xml index 113f6855..3acff256 100644 --- a/app/src/main/res/layout/item_post.xml +++ b/app/src/main/res/layout/item_post.xml @@ -98,7 +98,7 @@ android:paddingStart="16dp" android:paddingEnd="16dp" android:textSize="?attr/title_font_18" - android:textColor="@color/primaryTextColor" /> + android:textColor="?attr/primaryTextColor" /> @@ -287,7 +287,7 @@ android:scaleType="center" android:src="@drawable/ic_link" android:tint="@android:color/tab_indicator_text" - android:background="@color/grey" + android:background="?attr/noPreviewLinkBackgroundColor" android:visibility="gone"/> @@ -265,7 +265,7 @@ android:scaleType="center" android:src="@drawable/ic_link" android:tint="@android:color/tab_indicator_text" - android:background="@color/grey" + android:background="?attr/noPreviewLinkBackgroundColor" android:visibility="gone" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@id/barrier2" @@ -385,7 +385,7 @@ android:id="@+id/divider_item_post_compact" android:layout_width="match_parent" android:layout_height="1dp" - android:background="@color/dividerColor" /> + android:background="?attr/dividerColor" /> diff --git a/app/src/main/res/layout/item_post_detail.xml b/app/src/main/res/layout/item_post_detail.xml index e0bcc418..983ac476 100644 --- a/app/src/main/res/layout/item_post_detail.xml +++ b/app/src/main/res/layout/item_post_detail.xml @@ -78,7 +78,7 @@ android:layout_height="wrap_content" android:paddingStart="16dp" android:paddingEnd="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/title_font_18" android:textIsSelectable="true" android:enabled="true" @@ -140,8 +140,8 @@ android:textSize="?attr/font_12" android:textColor="@android:color/white" android:visibility="gone" - app:lib_setRoundedBGColor="@color/colorAccent" - app:lib_setRoundedBorderColor="@color/colorAccent" + app:lib_setRoundedBGColor="?attr/nsfwColor" + app:lib_setRoundedBorderColor="?attr/nsfwColor" app:lib_setRadius="3dp" app:lib_setRoundedView="true" app:lib_setShape="rectangle" /> @@ -267,7 +267,7 @@ android:id="@+id/image_view_no_preview_link_item_post_detail" android:layout_width="match_parent" android:layout_height="150dp" - android:background="@color/grey" + android:background="?attr/noPreviewLinkBackgroundColor" android:scaleType="center" android:src="@drawable/ic_link" android:tint="@android:color/tab_indicator_text" diff --git a/app/src/main/res/layout/item_rule.xml b/app/src/main/res/layout/item_rule.xml index 5230295c..8b003197 100644 --- a/app/src/main/res/layout/item_rule.xml +++ b/app/src/main/res/layout/item_rule.xml @@ -8,7 +8,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:padding="16dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/title_font_16" /> diff --git a/app/src/main/res/layout/item_user_listing.xml b/app/src/main/res/layout/item_user_listing.xml index 9ba6d291..e2b22637 100644 --- a/app/src/main/res/layout/item_user_listing.xml +++ b/app/src/main/res/layout/item_user_listing.xml @@ -24,7 +24,7 @@ android:layout_height="wrap_content" android:layout_gravity="center_vertical" android:layout_marginStart="32dp" - android:textColor="@color/primaryTextColor" + android:textColor="?attr/primaryTextColor" android:textSize="?attr/font_default" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toEndOf="@+id/user_icon_gif_image_view_item_user_listing" diff --git a/app/src/main/res/layout/item_view_all_comments.xml b/app/src/main/res/layout/item_view_all_comments.xml index 7a3b28fe..28816da4 100644 --- a/app/src/main/res/layout/item_view_all_comments.xml +++ b/app/src/main/res/layout/item_view_all_comments.xml @@ -1,18 +1,12 @@ - - - - - \ No newline at end of file + android:focusable="true" + android:text="@string/view_all_comments" + android:textColor="?attr/colorAccent" + android:textSize="?attr/font_default" /> \ No newline at end of file diff --git a/app/src/main/res/values-night-v27/styles.xml b/app/src/main/res/values-night-v27/styles.xml index 275f4057..9aba4df5 100644 --- a/app/src/main/res/values-night-v27/styles.xml +++ b/app/src/main/res/values-night-v27/styles.xml @@ -2,7 +2,7 @@ diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 61bd090a..6eab85d1 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -8,13 +8,13 @@ #FFC107 - #FFFFFF + - #69666C + - #424242 + #121212 @@ -22,11 +22,11 @@ #1565C0--> - #FFFFFF + #FFFFFF #242424 - #3C3C3C + - @color/backgroundColor + - #242424 + - #123E77 + - #123E77 + - #1565C0 + - #B3FFFFFF + - #1565C0 + diff --git a/app/src/main/res/values-v27/styles.xml b/app/src/main/res/values-v27/styles.xml index c354ca2c..5b6eb075 100644 --- a/app/src/main/res/values-v27/styles.xml +++ b/app/src/main/res/values-v27/styles.xml @@ -2,7 +2,7 @@ diff --git a/app/src/main/res/values/attr.xml b/app/src/main/res/values/attr.xml index 9f35b9be..03dfb30f 100644 --- a/app/src/main/res/values/attr.xml +++ b/app/src/main/res/values/attr.xml @@ -4,7 +4,7 @@ - + @@ -30,36 +30,51 @@ - - + + + + - - + + - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index c7880cd7..f5e397c5 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -8,13 +8,13 @@ #FFC107 - #000000 + - #E0E0E0 + - #E0E0E0 + #FFFFFF @@ -22,17 +22,17 @@ @color/colorPrimaryDark--> - #000000 + #000000 #FFFFFF - @android:color/black + #000000 - #F0F0F0 + - #FFFFFF + - #FFFFFF + - #B3E5F9 + - #B3E5F9 + - @color/colorPrimary + - #8A000000 + - #1565C0 +