Closed viadro closed 2 days ago
Hi @viadro, thanks for the detailed explanation.
Could you please share which SDK version you're using? Also, does this issue occur only on the screens you shared, or on others as well?
I've been using version 5.3.1
. Now I've updated it to 5.6.0
and the issue still occures. And it does occur on all screens in drop in
Hi @viadro,
According to the Material Design documentation, in dark mode, onColorSurface
is applied as a semi-transparent overlay:
Higher elevation, lighter surface The higher a surface's elevation (raising it closer to an implied light source), the lighter that surface becomes. That lightness is expressed through the application of a semi-transparent overlay using the On Surface color.
You can set the colorOnSurface
as transparent, which would hide the overlay, but I'd not recommend that approach, as it also styles other elements, which might cause some of them to not show. Following Material Design and your product guidelines should help you achieve the best result.
As for styling the text field hint color, use android:textColorHint
instead of hintTextColor
. If you don't, it defaults to onColorSurface with opacity applied.
Please try the suggestions above and let us know if you have any further questions.
@viadro do you still need any help with this?
Closing this for inactivity, please reopen if you need more help.
I try to implement dark mode for my adten drop in following this documentation: https://github.com/Adyen/adyen-android/blob/develop/docs/UI_CUSTOMIZATION.md#adding-dark-mode-support However I noticed that when I set
colorSurface
to a value that I want my background to be and then set setcolorOnSurface
to some other color then the background is not correct color but instead has this tint fromcolorOnSurface
. Just likecolorOnSurface
would be put on top with some alpha. Here is my style. I used black as mycolorSurface
and red ascolorOnSurfac
to illustrate the issue:adyen_text_input_color:
Here is the result: As you can is it is not exactly black but has this red tint.
I tried setting
colorOnSurface
to transparent but then hint inTextInputLayout
is not being shown. Also what I've noticed that hint is not exactly displayed incolorOnSurface
. In my style I ovverideAdyenCheckout.TextInputLayout
so that outline of the input is in correct color. Here is the screen: It may not be very clearly visible on the screenshot but the hint is different color than the outline. It looks muted, like it would have some alpha added. Also as you can see I tried to ovveridehintTextColor
inAdyenCheckout.TextInputLayout
but it doesn't seem to work.So what I would like to know is how can I set background color to exactly what I want and at the same time display hint also in the color I want.