xml - TextView with multiple color gradient effect in android -
how can create textview below
i tried few answers in stackoverflow including this.but none of them suitable issue
i tried code .but gradient effect vertically. need horizontal.
shader textshader=new lineargradient(0, 0, 0, 60, new int[]{color.parsecolor("#87d8b0"),color.parsecolor("#edb030")}, new float[]{0, 1}, shader.tilemode.clamp); textview.getpaint().setshader(textshader);
and tried this
textview.getpaint().setshader(new lineargradient(0,0,0,textview.getlineheight(),color.parsecolor("#87d8b0"), color.parsecolor("#edb030"), shader.tilemode.repeat));
i want more 2 colors gradient effect. please help
Comments
Post a Comment