Prosko
Lurker
I have a Frame Layout with an ImageView and a TextView inside it. I plan to make that text in the center of the picture. The problem is that the image won't fit, the ImageView won't wrap the height of the content good. Look at the picture:
https://i.stack.imgur.com/Urxkm.png
I need it to look like this: https://i.stack.imgur.com/UbGWJ.png
I tried mixing the height and with (wrap content and match parent) but the picture still won't fit well. This is the xml:
I have tried android:background="@drawable/tvrdjava in a linear layout, but that stretches the image for some reason.
The picture is in different drawable folders for different resolutions (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi).
Can anybody help ?
https://i.stack.imgur.com/Urxkm.png
I need it to look like this: https://i.stack.imgur.com/UbGWJ.png
I tried mixing the height and with (wrap content and match parent) but the picture still won't fit well. This is the xml:
Code:
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
card_view:srcCompat="@drawable/tvrdjava"
android:id="@+id/imageView3" />
<TextView
android:text="TextView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/textView6"
android:textAlignment="center"
android:textColor="@android:color/white"
/>
</FrameLayout>
I have tried android:background="@drawable/tvrdjava in a linear layout, but that stretches the image for some reason.
The picture is in different drawable folders for different resolutions (hdpi, mdpi, xhdpi, xxhdpi, xxxhdpi).
Can anybody help ?