My advice, If you have specific size for your background for each device, then go for relative layout, and set the background to your image. Because when using background in RelativeLayout
, It'll fit the size of the relative layout itself, whether the image suits the size of the RelativeLayout
or not. (Can be stretched/pixelated/Not properly added)
If you're not sure about specific size, you should use FrameLayout
, with ImageView
, that handles the ScaleType
, which can be centerCrop
, and it'll fit the layout in good shape.
And for the TextView
, use layout_gravity
, which will handle the position based on the parent layout.