google / play-services-plugins

Plugins to help with using Google Play services SDK.
https://developers.google.com/android/guides/overview
Apache License 2.0
458 stars 135 forks source link

[Feature request] Ability to set the theme in code / Make OssLicensesMenuActivity extendable #251

Open gmikhail opened 1 year ago

gmikhail commented 1 year ago

My app uses two themes (dark and light). After applying the new theme, I need to apply the new theme dynamically in activities via setTheme in onCreate. But I can't set the theme in OssLicensesMenuActivity via code. Only set statically in the manifest:

 <activity
            android:name="com.google.android.gms.oss.licenses.OssLicensesMenuActivity"
            android:theme="@style/AppThemeDark" />

It would be nice to be able to set the theme in code. Something like this:

OssLicensesMenuActivity.setActivityTheme(R.style.AppThemeDark);

Or at least make OssLicensesMenuActivity not final so it can be extended.

alwa commented 1 year ago

Somewhat related: https://github.com/google/accompanist/issues/1314