From 0def7e7230fc67d41095bc29d63a73944d778fff Mon Sep 17 00:00:00 2001 From: Nik Clayton Date: Fri, 30 Dec 2022 13:11:26 +0100 Subject: [PATCH] Provide default text sizes in TuskyBaseTheme (#3108) These aren't necessary for the app, and are overwritten with the actual style in `BaseActivity.onCreate()`. But if they're missing the Android Studio layout preview renderer crashes. --- .../main/java/com/keylesspalace/tusky/BaseActivity.java | 2 +- app/src/main/res/values/styles.xml | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java b/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java index cb262806..9fec5b4e 100644 --- a/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java +++ b/app/src/main/java/com/keylesspalace/tusky/BaseActivity.java @@ -82,7 +82,7 @@ public abstract class BaseActivity extends AppCompatActivity implements Injectab setTaskDescription(new ActivityManager.TaskDescription(appName, appIcon, recentsBackgroundColor)); int style = textStyle(preferences.getString("statusTextSize", "medium")); - getTheme().applyStyle(style, false); + getTheme().applyStyle(style, true); if(requiresLogin()) { redirectIfNotLoggedIn(); diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 1f0704da..f17abf9f 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -41,6 +41,13 @@