So, I have four buttons, all of them use match_parent for height and width. I use the "drawableTop" attribute to have images inside the buttons themselves, and I would like to do this, so I don't need separate images for each resolution. Here is a portrait screen shot that I took. Landscape alone will be a bit.

So, it looks great, and everyone except me has only 4 different image resolutions and testing them on my phone did not bring positive results. Is there a way that I can just have one larger image, say, just “stretch” and compress it to fit all the resolutions? If not, what should I do? I am currently using hdpi, ldpi, mdpi and xhdpi, but I would like to cover all the borders. What other densities exist?
If I can achieve automatic resizing, I also do not have to prevent users from using Landscape:

Also here is the xml:
<LinearLayout android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_weight="1" android:baselineAligned="false" android:orientation="horizontal" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" tools:ignore="NestedWeights" > <Button android:id="@+id/bMap" android:layout_width="match_parent" android:layout_height="match_parent" android:drawableTop="@drawable/ic_camera" android:text="Button" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" > <Button android:id="@+id/bCamera" android:layout_width="match_parent" android:layout_height="match_parent" android:drawableTop="@drawable/ic_camera" android:text="Button" /> </LinearLayout> </LinearLayout> <LinearLayout android:layout_width="fill_parent" android:layout_height="match_parent" android:layout_weight="1" android:baselineAligned="false" android:orientation="horizontal" > <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" tools:ignore="NestedWeights" > <Button android:id="@+id/bGallery" android:layout_width="match_parent" android:layout_height="match_parent" android:drawableTop="@drawable/ic_camera" android:text="Button" /> </LinearLayout> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_weight="1" android:orientation="vertical" > <Button android:id="@+id/bPlants" android:layout_width="match_parent" android:layout_height="match_parent" android:drawableTop="@drawable/ic_camera" android:text="Button" /> </LinearLayout> </LinearLayout>
snotyak
source share