Instead of programatically passing parameters to create a LinearGradient.
new LinearGradient(0, 0, 0, mWheelHeight, Color.parseColor("#4A90E2"), Color.parseColor("#50E3C2"), Shader.TileMode.MIRROR);
is it possible to load the colors from XML?
Instead of programatically passing parameters to create a LinearGradient.
new LinearGradient(0, 0, 0, mWheelHeight, Color.parseColor("#4A90E2"), Color.parseColor("#50E3C2"), Shader.TileMode.MIRROR);
is it possible to load the colors from XML?
You can set this directly inside Paint
paint.setShader(new LinearGradient(0, 0, 0, getHeight(), Color.BLACK, Color.WHITE, Shader.TileMode.MIRROR));