I am trying to draw a gradient to the background of AndroidPlot, all I need is an Object of Paint.
So I would use this code:
int[] co = new int[]{Color.RED,Color.YELLOW,Color.GREEN,Color.YELLOW,Color.RED};
float[] coP = new float[]{0.1f,0.1f,0.6f,0.1f,0.1f};
>Paint pa = new Paint();
>pa.setAlpha(200);
>pa.setShader(new LinearGradient(0,0,250,graphv.getHeight(),co,coP,Shader.TileMode.REPEAT));
But the background is only one color: RED.
I don't know why, or how to fix it..
Do you have any ideas?