Fix theming on multiple elements

Fixed theming on:
- Post content on PostImage and PostLink activities
- Report content forms

Closes #163
This commit is contained in:
Balazs Toldi 2023-08-24 20:09:52 +02:00
parent 3594f10fdd
commit 2d83545865
No known key found for this signature in database
GPG Key ID: 6C7D440036F99D58
4 changed files with 20 additions and 5 deletions

View File

@ -475,6 +475,8 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
nsfwTextView.setTextColor(primaryTextColor);
titleEditText.setTextColor(primaryTextColor);
titleEditText.setHintTextColor(secondaryTextColor);
contentEditText.setTextColor(primaryTextColor);
contentEditText.setHintTextColor(secondaryTextColor);
boolean circleFab = mSharedPreferences.getBoolean(SharedPreferencesUtils.USE_CIRCULAR_FAB, false);
applyFABTheme(captureFab, circleFab);
applyFABTheme(selectFromLibraryFab, circleFab);
@ -487,6 +489,10 @@ public class PostImageActivity extends BaseActivity implements FlairBottomSheetF
titleEditText.setTypeface(typeface);
selectAgainTextView.setTypeface(typeface);
}
if (contentTypeface != null) {
contentEditText.setTypeface(contentTypeface);
}
}
private void loadImage() {

View File

@ -458,6 +458,8 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
titleEditText.setHintTextColor(secondaryTextColor);
suggestTitleButton.setBackgroundColor(mCustomThemeWrapper.getColorPrimaryLightTheme());
suggestTitleButton.setTextColor(mCustomThemeWrapper.getButtonTextColor());
contentEditText.setTextColor(primaryTextColor);
contentEditText.setHintTextColor(secondaryTextColor);
linkEditText.setTextColor(primaryTextColor);
linkEditText.setHintTextColor(secondaryTextColor);
if (typeface != null) {
@ -470,6 +472,7 @@ public class PostLinkActivity extends BaseActivity implements FlairBottomSheetFr
}
if (contentTypeface != null) {
linkEditText.setTypeface(contentTypeface);
contentEditText.setTypeface(contentTypeface);
}
}

View File

@ -211,6 +211,12 @@ public class CommentMoreBottomSheetFragment extends LandscapeExpandedRoundedBott
LayoutInflater dialog_inflater = LayoutInflater.from(activity);
View dialog_view = dialog_inflater.inflate(R.layout.dialog_report, null);
EditText reasonEditText = dialog_view.findViewById(R.id.reasonEditText);
reasonEditText.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
reasonEditText.setHintTextColor(mCustomThemeWrapper.getSecondaryTextColor());
if (activity.typeface != null) {
reasonEditText.setTypeface(activity.typeface);
}
reasonEditText.setHighlightColor(mCustomThemeWrapper.getColorAccent());
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(activity)
.setTitle(R.string.report_post)

View File

@ -1155,10 +1155,6 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
.show();
return true;
} else if (itemId == R.id.action_report_view_post_detail_fragment) {
if (mAccessToken == null) {
Toast.makeText(activity, R.string.login_first, Toast.LENGTH_SHORT).show();
return true;
}
if (mAccessToken == null) {
Toast.makeText(activity, R.string.login_first, Toast.LENGTH_SHORT).show();
return true;
@ -1166,7 +1162,11 @@ public class ViewPostDetailFragment extends Fragment implements FragmentCommunic
LayoutInflater inflater = LayoutInflater.from(activity);
View view = inflater.inflate(R.layout.dialog_report, null);
EditText reasonEditText = view.findViewById(R.id.reasonEditText);
reasonEditText.setTextColor(mCustomThemeWrapper.getPrimaryTextColor());
reasonEditText.setHintTextColor(mCustomThemeWrapper.getSecondaryTextColor());
if (activity.typeface != null) {
reasonEditText.setTypeface(activity.typeface);
}
MaterialAlertDialogBuilder builder = new MaterialAlertDialogBuilder(activity)
.setTitle(R.string.report_post)
.setView(view)