Something that makes the game look bad is the plain white background we have at the moment. While we could set a background for the activity, this is not the best solution because background images are set to scale to fit, and that cannot be changed. When using a background image it will expand to cover all the view.
We do not want our background image to be stretched in one dimension. We want it to scale uniformly on both axes.
This can be improved with the use of a 9-patch as the background image, but in our case we will just use an ImageView
that covers all the layout with scaleType
set to centerCrop
. This parameter does scale the image uniformly (maintaining the image's aspect ratio) so that both dimensions of the image (width and height) will be equal to or larger than the corresponding dimension of the View
.
We will add an ImageView
at the beginning of fragment_main_menu.xml...