If you set a background resource for the layout, and the image appears under the layout itself (i.e., below all the components), you probably are not adding the background resource to the correct layout.
But since you do not have much information, this may not even be so.
Maybe your image is actually much smaller than the table itself, and instead of expanding to the size of the table, can it stay at a fixed level (which would probably be centered in the layout)?
Try setting the table background to a fixed color (i.e. view.setBackgroundColor (Color.BLACK);) to check this. If the whole table is populated as you expected, it is probably related to the image you are using.
If the color fills only the same area that the image resource used previously, then this is probably my first thought that you are not adding the resource to the corresponding layout.
source share