Loading app/src/main/java/app/fedilab/android/BaseMainActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.helper.PinnedTimelineHelper; import app.fedilab.android.helper.PushHelper; import app.fedilab.android.helper.ThemeHelper; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer; Loading Loading @@ -301,7 +302,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } else { BaseMainActivity.currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null); } ThemeHelper.initiliazeColors(BaseMainActivity.this); mamageNewIntent(getIntent()); filterFetched = false; Loading app/src/main/java/app/fedilab/android/helper/ThemeHelper.java +13 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,19 @@ public class ThemeHelper { return typedValue.data; } public static void initiliazeColors(Activity activity) { TypedValue typedValue = new TypedValue(); Resources.Theme theme = activity.getTheme(); theme.resolveAttribute(R.attr.linkColor, typedValue, true); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity); linkColor = -1; if (prefs.getBoolean("use_custom_theme", false)) { linkColor = prefs.getInt("theme_link_color", -1); } if (linkColor == -1) { linkColor = typedValue.data; } } public static int fetchAccentColor(Context context) { TypedValue typedValue = new TypedValue(); Loading app/src/main/res/layout/fragment_login_join.xml +2 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?backgroundColor" android:background="?android:windowBackground" android:orientation="vertical" android:padding="12dp" tools:context=".activities.LoginActivity"> Loading app/src/main/res/layout/fragment_login_main.xml +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:background="?backgroundColor" android:background="?android:windowBackground" android:layout_height="match_parent"> <androidx.appcompat.widget.AppCompatImageButton Loading app/src/main/res/layout/fragment_login_pick_instance_mastodon.xml +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?backgroundColor" android:background="?android:windowBackground" android:orientation="vertical" android:padding="12dp"> Loading Loading
app/src/main/java/app/fedilab/android/BaseMainActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -139,6 +139,7 @@ import app.fedilab.android.helper.Helper; import app.fedilab.android.helper.MastodonHelper; import app.fedilab.android.helper.PinnedTimelineHelper; import app.fedilab.android.helper.PushHelper; import app.fedilab.android.helper.ThemeHelper; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonConversation; import app.fedilab.android.ui.fragment.timeline.FragmentMastodonTimeline; import app.fedilab.android.ui.fragment.timeline.FragmentNotificationContainer; Loading Loading @@ -301,7 +302,7 @@ public abstract class BaseMainActivity extends BaseActivity implements NetworkSt } else { BaseMainActivity.currentToken = sharedpreferences.getString(Helper.PREF_USER_TOKEN, null); } ThemeHelper.initiliazeColors(BaseMainActivity.this); mamageNewIntent(getIntent()); filterFetched = false; Loading
app/src/main/java/app/fedilab/android/helper/ThemeHelper.java +13 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,19 @@ public class ThemeHelper { return typedValue.data; } public static void initiliazeColors(Activity activity) { TypedValue typedValue = new TypedValue(); Resources.Theme theme = activity.getTheme(); theme.resolveAttribute(R.attr.linkColor, typedValue, true); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(activity); linkColor = -1; if (prefs.getBoolean("use_custom_theme", false)) { linkColor = prefs.getInt("theme_link_color", -1); } if (linkColor == -1) { linkColor = typedValue.data; } } public static int fetchAccentColor(Context context) { TypedValue typedValue = new TypedValue(); Loading
app/src/main/res/layout/fragment_login_join.xml +2 −1 Original line number Diff line number Diff line Loading @@ -19,7 +19,8 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?backgroundColor" android:background="?android:windowBackground" android:orientation="vertical" android:padding="12dp" tools:context=".activities.LoginActivity"> Loading
app/src/main/res/layout/fragment_login_main.xml +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:background="?backgroundColor" android:background="?android:windowBackground" android:layout_height="match_parent"> <androidx.appcompat.widget.AppCompatImageButton Loading
app/src/main/res/layout/fragment_login_pick_instance_mastodon.xml +1 −1 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:background="?backgroundColor" android:background="?android:windowBackground" android:orientation="vertical" android:padding="12dp"> Loading