Fix ErrorActivity colors

This commit is contained in:
krlvm 2021-03-29 22:44:03 +03:00
parent 561d5675f7
commit c8b4685fc9
No known key found for this signature in database
GPG key ID: B8552A91FD265536
2 changed files with 8 additions and 0 deletions

View file

@ -137,6 +137,8 @@ public class ErrorActivity extends AppCompatActivity {
protected void onCreate(final Bundle savedInstanceState) {
assureCorrectAppLanguage(this);
super.onCreate(savedInstanceState);
ThemeHelper.setDayNightMode(this);
ThemeHelper.setTheme(this);
activityErrorBinding = ActivityErrorBinding.inflate(getLayoutInflater());

View file

@ -47,6 +47,9 @@ public final class ThemeHelper {
* Apply the selected theme (on NewPipe settings) in the context
* with the default style (see {@link #setTheme(Context, int)}).
*
* ThemeHelper.setDayNightMode should be called before
* the applying theme for the first time in session
*
* @param context context that the theme will be applied
*/
public static void setTheme(final Context context) {
@ -57,6 +60,9 @@ public final class ThemeHelper {
* Apply the selected theme (on NewPipe settings) in the context,
* themed according with the styles defined for the service .
*
* ThemeHelper.setDayNightMode should be called before
* the applying theme for the first time in session
*
* @param context context that the theme will be applied
* @param serviceId the theme will be styled to the service with this id,
* pass -1 to get the default style