خرید بک لینک

Vote count: 0

A non-custom notification built with android.support.v7.app.NotificationCompat.MediaStyle can appear in very low contrast on Android Marshmallow. (It's fine on Lollipop and Nougat.)

Fig. 1. On Marshmallow, from outside the app, its pull-down notification has light text on a dark background: enter image description here

Fig. 2. When the app's Activity is ruing, it switches to non-MediaStyle to present alarm notifications without play/pause/stop controls, so they get the expected dark text on a light background: enter image description here

Fig. 3. On Marshmallow, outside the app the heads-up notification has very low contrast: enter image description here --> That's hard to read!

Fig. 4. As an experiment, calling NotificationCompat.Builder#setColor(0xb71c1c) does indeed set the non-MediaStyle notification's accent color (compare with Fig. 2): enter image description here

Fig. 5. ... and on Marshmallow, it sets the background color of MediaStyle notifications: enter image description here which is too much color and no doubt out of spec.

Fig. 6. As a test workaround, the app could call setColor(0x9e9e9e) (the standard accent color), which makes the heads-up notification more readable if out of spec: enter image description here

Fig. 7. ... but it also makes the pull-down notification unusual and out of spec: enter image description here

Fig. 8. ... and it looks worse in the large form: enter image description here

Q. Is there a workaround to make the heads-up MediaStyle notification more readable without messing up the pull-down MediaStyle notification?

Obviously it'll be a Marshmallow-only workaround.

asked 35 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 27 تير 1395 ساعت: 3:59

صفحه بندی