मुझे कोई समस्या है। मैं रंग के रूप में ढाल के साथ एक टेक्स्टव्यू देखना चाहता हूं। और इसके पीछे एक काला छाया। समस्या यह है कि छाया नामक रंग का उपयोग करने का जगह में ढाल के रंग का उपयोग कर रहा है (Color.BLACK
)टेक्स्ट व्यू ढाल और छाया जोड़ना
मेरे कोड है: numberTextView = (TextView)findViewById(R.id.something);
Shader textShaderTop = new LinearGradient(0, 30, 0, 60,
new int[]{Color.parseColor("#A6A6A6"), Color.parseColor("#E8E8E8"), Color.parseColor("#A6A6A6")},
new float[]{0, 0.5f, 1}, TileMode.CLAMP);
numberTextView.getPaint().setShader(textShaderTop);
numberTextView.setShadowLayer(
0.1f, //float radius
20f, //float dx
20f, //float dy
Color.BLACK //this is not black on the screen, but it uses the gradient color!?
);
किसी को क्या करना है जानता है