Ok I tried some methods but I failed…
My background painting code is like this:
canvas.drawRect(0, 0, getWidth(), getHeight(), background);
So as you can see that code will paint the whole screen with the color specified in background(xml);
The problem is that I want to Paint only about 65% of the upper screen part and the rest of 35% will remain black at the bottom part.I wanna do this because on the upper part I wanna write a question,and at the bottom I will have about 4 buttons.
Try this: