android - Semi-transparent gradients become a solid color on Kitkat -
when run app on kitkat device semi-transparent gradients in app become solid color. unfortunately can't post screenshots due app being in development.
examples:
- semi-transparent grey gradient on light background becomes solid black
- semi-transparent grey gradient on black background becomes solid white
this problem not reproducible on lollipop , above. min sdk 19, compile , target sdks 23.
has ever experienced similar problem?
important edit:
when background app , come rendered correctly.
i able achieve gradient background through code
gradientdrawable gradientdrawable = new gradientdrawable( gradientdrawable.orientation.top_bottom, new int[]{0xff151d2a, 0xff591e22, 0xff901e1e}); // gradient color codes gradientdrawable.setcornerradius(0f); // setting corner radius gradientdrawable.setgradientradius(5); // setting graidnet radius gradientdrawable.setgradientcenter(5, 5); gradientdrawable.setgradienttype(gradientdrawable.linear_gradient); mdrawerlayout.setbackground(gradientdrawable);
Comments
Post a Comment