我有一个imageView下面我的第一个textView和一个textView下面的图像。所以我想重新调整imageView的大小以使它不会占用超过一半的屏幕。但到目前为止,当我尝试将高度更改为wrap_content或match_parent时,它仍然是相同的大小。我也尝试设置最大高度,但似乎没有做任何事情。更改ImageView的高度?
我的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/bg_gblue" >
<TextView
android:id="@+id/faq_story1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/faqpt1"
android:textSize="15sp" />
<ImageView
android:id="@+id/faq_pic1"
android:src="@drawable/skull"
android:layout_width="wrap_content"
android:layout_height="5dp"
android:maxHeight="10dp"
android:layout_above="@+id/faq_story2"
android:layout_below="@+id/faq_story1"
/>
<TextView
android:id="@+id/faq_story2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:text="@string/faqpt2"/>"
</RelativeLayout>
感谢。
有编辑我现在答检查 –