У меня есть следующий макет:Align TextView в нижнюю часть ImageView внутри RelativeLayout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<ImageView
android:id="@+id/img"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/miclubpyme_backgroundl" />
<TextView
android:id="@+id/txtStoreName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="I am a text"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
Я хотел бы иметь TextView выравнивать к нижней части ImageView, но не за его пределами. Добавление layout_alignParentBottom заставляет RelativeView занимать всю высоту экрана.
Вот изображение exemplyfing это:
``
Любая помощь будет принята с благодарностью. Спасибо!
Какая часть изображения, а какая нет? Похоже, есть еще одна часть, которая занимает пространство между изображением и нижней частью макета устройства. – Eenvincible