我有一些帶有一些元素的ScrollView。 我的問題是,我不能在動態高度上設置textview上面的ImageView。帶有動態高度的ImageView上方的TextView
我有3個不同高度的ImageView,它們可以被看到或消失。 他們上面我需要把與背景色文字,這段文字必須在ImageView的 的底部
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/pic"
android:layout_width="match_parent"
android:layout_height="wrap_content">
</ImageView>
<TextView
android:id="@+id/third_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:padding="8dp"
android:layout_alignParentBottom="true"
android:layout_above="@id/third_picture"
android:gravity="center_horizontal"
android:background="@android:color/white"
android:text="example text">
</TextView>
我嘗試了很多,但我的觀點是永遠打破。 請幫助,我需要一些proffesional建議。
你可以嘗試用你選擇的任何圖像這 - 組佈局的背景....並把TextView的正常...無imageview的需要 – WISHY