custom colors per account

This commit is contained in:
Thomas 2023-03-24 16:27:25 +01:00
parent 8ffd5b3a19
commit fdbb3b04f3
3 changed files with 3 additions and 2 deletions

View file

@ -99,7 +99,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'com.google.android.material:material:1.9.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

View file

@ -143,8 +143,8 @@ public class BaseActivity extends AppCompatActivity {
}
}
super.onCreate(savedInstanceState);
ThemeHelper.applyThemeColor(this);
ThemeHelper.applyThemeColor(this);
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.N) {
ThemeHelper.adjustFontScale(this, getResources().getConfiguration());
}

View file

@ -303,6 +303,7 @@ public class ThemeHelper {
}
DynamicColorsOptions.Builder builder = new DynamicColorsOptions.Builder();
builder.setContentBasedSource(bmp);
builder.setThemeOverlay(R.style.ThemeOverlay_Material3_DynamicColors_DayNight);
DynamicColorsOptions dynamicColorsOptions = builder.build();
DynamicColors.applyToActivityIfAvailable(activity, dynamicColorsOptions);
} else if (dynamicColor) {