Update: Yes, I can come up with a way to do this in xml. set the gradient on the background layout. Then create an image with nine patches with a transparent circle of the desired size with a white filling around it and a small ninth patch defined around each edge (so that the circle does not stretch).
Set the TextView background to your ninth patch and make sure the grid cells are stretched to fit the entire table layout (so that the white edge of the merge merges.
Original answer: I can't think of an easy way to do this and definitely not in xml. You will probably need to create a class that extends the Drawable class so that you can override the onDraw method. You will need to create a RadialGradient (Shader, not Drawable), and then each button will create paint with a shader installed in a common shader.
Then, when you draw each button, you need to look at the y value of the button, translate the canvas by -y amount, and then draw a circle (canvas.drawCircle (..) in y using your shader paint. This should put the circle in one and the same the same place on the screen, with a color gradient displayed as if the gradient was drawn on the entire page, but displayed only where the buttons are located.
source share