New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(android)(9_3_X): use material theme by default #11921
Conversation
- Changed default theme from "Theme.AppCompat" to "Theme.MaterialComponents.Bridge". * The material bridge uses the same dark theme as AppCompat and adds the new material styles. - Fixed bug where modal/translucent windows ignore "tiapp.xml" setting <navbar-hidden/>. - Added new Titanium themes which derive from custom theme assigned to app. - Deprecated "Theme.AppCompat.*" since material widgets require a material theme. Fixes TIMOB-27714, TIMOB-28084, TIMOB-28087
|
Can this cause breaking changes? I'm asking because we do a lot of theme-based styling of tint colors etc, where we override single AppCompat Widget instances (like Sliders and Tabs). I love this change, but just want to be sure we don't mess up during upgrade ✌️ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally looks good to me, but my understanding of the Android themes is minimal, so definitely @garymathews should take a look at those xml changes.
@hansemannn, it's not a breaking-change since we're still using the older widgets. When we do switch over to the material based widgets such as MaterialButton, MaterialToolbar, MaterialAlertDialogBuilder, MaterialCardView, etc. then that would be a breaking-change because they require Would this be a huge pain in Titanium 10? Maybe... but I also know devs want to use the new material widget features. We'll figure something out. For Titanium 9.3.0, this is backward compatible. And Google's material themes which end with If you want to use @m1ga tab badges feature in PR #11659, then I recommend that you change your custom app theme's parent from |
- Removed "app:popupTheme" from toolbar layouts so it would respect app theme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CR: PASS
Although, we will need to also update https://docs.appcelerator.com/platform/latest/#!/guide/Android_Themes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FR Passed, tested using the two examples shown in description.
Test Environment
MacOS Big Sur: 11.0 Beta 7
Xcode: 12.0
Java Version: 1.8.0_242
Android NDK: 21.3.6528147
Node.js: 12.18.1
""NPM":"5.0.0","CLI":"8.1.1""
Pixel XL (10.0)
JIRA:
Summary:
Theme.AppCompat
toTheme.MaterialComponents.Bridge
.<navbar-hidden/>
.<application/>
assigned theme.Theme.Titanium.NoTitleBar
Theme.Titanium.Fullscreen
Theme.Titanium.Translucent.NoTitleBar
Theme.Titanium.Translucent.Fullscreen
Theme.Titanium.Translucent
already exists and works in the same manner.Theme.AppCompat.*
themes since material widgets require a material theme.Theme.Titanium.*
themes instead.Default Material Theme Test:
This verifies TIMOB-27714 and TIMOB-28084.
false
../build/android/app/src/main/AndroidManifest.xml
android:theme
is set to"@style/Theme.MaterialComponents.Bridge"
.<navbar-hidden/>
totrue
../build/android/app/src/main/AndroidManifest.xml
android:theme
is set to"@style/Theme.MaterialComponents.NoActionBar.Bridge"
.<fullscreen/>
totrue
../build/android/app/src/main/AndroidManifest.xml
android:theme
is set to"@style/Theme.MaterialComponents.Fullscreen.Bridge"
.app.js
tiapp.xml
Titanium Theme Test:
This verifies TIMOB-28087.
tiapp.xml
./platform/android/res/values/my_theme.xml
app.js