Fix some themeing issues. Minor bugs fixed.

This commit is contained in:
Alex Ning 2020-04-05 20:50:00 +08:00
parent 86171535a6
commit 20e785e2eb
8 changed files with 38 additions and 1 deletions

View File

@ -237,7 +237,9 @@ public class CommentActivity extends BaseActivity {
commentParentMarkwonView.setTextColor(mCustomThemeWrapper.getCommentColor());
divider.setBackgroundColor(mCustomThemeWrapper.getDividerColor());
commentEditText.setTextColor(mCustomThemeWrapper.getCommentColor());
markdownColor = mCustomThemeWrapper.getSecondaryTextColor();
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
commentEditText.setHintTextColor(secondaryTextColor);
markdownColor = secondaryTextColor;
}
private void getCurrentAccount() {

View File

@ -215,13 +215,17 @@ public class CreateMultiRedditActivity extends BaseActivity {
@Override
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
int primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor();
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
nameEditText.setTextColor(primaryTextColor);
nameEditText.setHintTextColor(secondaryTextColor);
int dividerColor = mCustomThemeWrapper.getDividerColor();
divider1.setBackgroundColor(dividerColor);
divider2.setBackgroundColor(dividerColor);
descriptionEditText.setTextColor(primaryTextColor);
descriptionEditText.setHintTextColor(secondaryTextColor);
visibilityTextView.setTextColor(primaryTextColor);
selectSubredditTextView.setTextColor(primaryTextColor);
}

View File

@ -249,14 +249,18 @@ public class EditMultiRedditActivity extends BaseActivity {
@Override
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
progressBar.setIndeterminateTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorAccent()));
int primaryTextColor = mCustomThemeWrapper.getPrimaryTextColor();
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
nameEditText.setTextColor(primaryTextColor);
nameEditText.setHintTextColor(secondaryTextColor);
int dividerColor = mCustomThemeWrapper.getDividerColor();
divider1.setBackgroundColor(dividerColor);
divider2.setBackgroundColor(dividerColor);
descriptionEditText.setTextColor(primaryTextColor);
descriptionEditText.setHintTextColor(secondaryTextColor);
visibilityTextView.setTextColor(primaryTextColor);
selectSubredditTextView.setTextColor(primaryTextColor);
}

View File

@ -378,6 +378,8 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
subredditNameTextView.setTextColor(secondaryTextColor);
rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor());
rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme()));
int dividerColor = mCustomThemeWrapper.getDividerColor();
@ -391,7 +393,11 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
spoilerTextColor = mCustomThemeWrapper.getSpoilerTextColor();
nsfwBackgroundColor = mCustomThemeWrapper.getNsfwBackgroundColor();
nsfwTextColor = mCustomThemeWrapper.getNsfwTextColor();
flairTextView.setTextColor(flairTextColor);
spoilerTextView.setTextColor(spoilerTextColor);
nsfwTextView.setTextColor(nsfwTextColor);
titleEditText.setTextColor(primaryTextColor);
titleEditText.setHintTextColor(secondaryTextColor);
applyFABTheme(captureFab);
applyFABTheme(selectFromLibraryFab);
selectAgainTextView.setTextColor(mCustomThemeWrapper.getColorAccent());

View File

@ -317,6 +317,8 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
subredditNameTextView.setTextColor(secondaryTextColor);
rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor());
rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme()));
int dividerColor = mCustomThemeWrapper.getDividerColor();
@ -330,8 +332,13 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
spoilerTextColor = mCustomThemeWrapper.getSpoilerTextColor();
nsfwBackgroundColor = mCustomThemeWrapper.getNsfwBackgroundColor();
nsfwTextColor = mCustomThemeWrapper.getNsfwTextColor();
flairTextView.setTextColor(flairTextColor);
spoilerTextView.setTextColor(spoilerTextColor);
nsfwTextView.setTextColor(nsfwTextColor);
titleEditText.setTextColor(primaryTextColor);
titleEditText.setHintTextColor(secondaryTextColor);
linkEditText.setTextColor(primaryTextColor);
linkEditText.setHintTextColor(secondaryTextColor);
}
private void getCurrentAccount() {

View File

@ -321,6 +321,8 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
subredditNameTextView.setTextColor(secondaryTextColor);
rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor());
rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme()));
int dividerColor = mCustomThemeWrapper.getDividerColor();
@ -334,8 +336,13 @@ public class PostTextActivity extends BaseActivity implements FlairBottomSheetFr
spoilerTextColor = mCustomThemeWrapper.getSpoilerTextColor();
nsfwBackgroundColor = mCustomThemeWrapper.getNsfwBackgroundColor();
nsfwTextColor = mCustomThemeWrapper.getNsfwTextColor();
flairTextView.setTextColor(flairTextColor);
spoilerTextView.setTextColor(spoilerTextColor);
nsfwTextView.setTextColor(nsfwTextColor);
titleEditText.setTextColor(primaryTextColor);
titleEditText.setHintTextColor(secondaryTextColor);
contentEditText.setTextColor(primaryTextColor);
contentEditText.setHintTextColor(secondaryTextColor);
}
private void getCurrentAccount() {

View File

@ -383,6 +383,8 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
protected void applyCustomTheme() {
coordinatorLayout.setBackgroundColor(mCustomThemeWrapper.getBackgroundColor());
applyAppBarLayoutAndToolbarTheme(appBarLayout, toolbar);
int secondaryTextColor = mCustomThemeWrapper.getSecondaryTextColor();
subredditNameTextView.setTextColor(secondaryTextColor);
rulesButton.setTextColor(mCustomThemeWrapper.getButtonTextColor());
rulesButton.setBackgroundTintList(ColorStateList.valueOf(mCustomThemeWrapper.getColorPrimaryLightTheme()));
int dividerColor = mCustomThemeWrapper.getDividerColor();
@ -396,7 +398,11 @@ public class PostVideoActivity extends BaseActivity implements FlairBottomSheetF
spoilerTextColor = mCustomThemeWrapper.getSpoilerTextColor();
nsfwBackgroundColor = mCustomThemeWrapper.getNsfwBackgroundColor();
nsfwTextColor = mCustomThemeWrapper.getNsfwTextColor();
flairTextView.setTextColor(flairTextColor);
spoilerTextView.setTextColor(spoilerTextColor);
nsfwTextView.setTextColor(nsfwTextColor);
titleEditText.setTextColor(primaryTextColor);
titleEditText.setHintTextColor(secondaryTextColor);
applyFABTheme(captureFab);
applyFABTheme(selectFromLibraryFab);
selectAgainTextView.setTextColor(mCustomThemeWrapper.getColorAccent());

View File

@ -154,6 +154,7 @@ public class SubscribedSubredditsRecyclerViewAdapter extends RecyclerView.Adapte
((SubredditViewHolder) viewHolder).favoriteImageView.setVisibility(View.GONE);
name = username;
iconUrl = userIconUrl;
viewHolder.itemView.setOnClickListener(view -> itemClickListener.onClick(name, iconUrl, true));
} else if (hasClearSelectionRow && viewHolder.getAdapterPosition() == 1) {
((SubredditViewHolder) viewHolder).favoriteImageView.setVisibility(View.GONE);
name = username;