-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Fix buttons not taking a translucent background color #3027
Fix buttons not taking a translucent background color #3027
Conversation
Change-Id: I7781e710b4c3efd41c9585e2e5cd4c6cc2d50736
Note that I have not yet tested this on a version of Android lower than SDK 21 Lollipop. |
Here is an example of what this looks like. Button2 has a blue background with 50% transparency which yields a purple tint, Button3 has a yellow background with 50% transparency which yields an orange tint, and Button4 has no background, which also needs the shadow suppressed (the state/outline manipulation is responsible for this). |
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.
FATAL EXCEPTION: main │
│E/AndroidRuntime( 3067): java.lang.NoClassDefFoundError: android/view/ViewOutlineProvider
on KitKat
Change-Id: I508ff593e0f5d60eeaaa18a529c6c7318898962d
Change-Id: I1f5a5dfe587a0a3a2d328d50cbaaec1709f0971a
@jisqyv I've pushed two changes. The first fixes the crash on Android versions prior to 5.0. The second one removes a check that no longer seems to be need which forces the background color in Device Default and other themes to be white. The latter was something I bumped into when testing using the old emulator running Android 2.x using the button test project previously shared. We may want to keep the last commit separate since it's somewhat independent of the original reason for this change (but needed if testing the change on an old version of Android). |
@ewpatton I've tested this on KitKat (emulated) and on my phone. The Companion no longer crashes on KitKat. However the test app doesn't look the same (different colors) and on KitKat the "Screen 1" text does not show up. Here is a link to a zip file with screenshots from both the KitKat (emulated) and my phone. https://r2.qyv.net/share/QeNyMz4L |
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.
LGTM
Change-Id: I7781e710b4c3efd41c9585e2e5cd4c6cc2d50736