endlessm / kolibri-installer-android

Android wrapper for Kolibri.
MIT License
0 stars 0 forks source link

Make webview-age dialog less ugly again #174

Open wjt opened 1 year ago

wjt commented 1 year ago

In #173 we reverted a theme change that had been made to make the "your webview is too old" dialog not ugly. This is because the theme change brought with it a titlebar colour change.

To have the best of both world, we can define a theme that derives from the Material theme and only overrides the statusbar/titlebar colour. For extra credit, we could also explore using the setStatusBarColor API to adjust the titlebar colour to fit the content within.

dbnicholson commented 1 year ago

You can also specify the theme for the dialog, but that would only be for the one dialog we load. I don't know what would happen for dialogs spawned by other means.

dbnicholson commented 1 year ago

I'm going to see about defining a custom theme derived from Material with a black status bar. We'll see if p4a makes that possible, though. I'm worried that calling setStatusBar will happen too late with p4a since we don't actually run our own code until well after the app has been initialized.

dbnicholson commented 1 year ago

Not suprisingly, p4a has no support for custom resource values, so a custom theme will require adding support there.

dbnicholson commented 1 year ago

Ready in https://github.com/endlessm/python-for-android/pull/19 and https://github.com/endlessm/kolibri-installer-android/pull/176. The p4a side needs to be merged and released first.

dbnicholson commented 1 year ago

I tagged the p4a changes so they could be used. We discussed in the team meeting today that it would be preferable not to touch the appearance anymore right now before we take a break from this work. I moved the theme change back to a draft so it doesn't get merged right now.