图像视图不包裹内容

6 浏览
0 Comments

图像视图不包裹内容

我有一个包装这个图片的ImageView:


并且它的下方是一个TextView。不幸的是,它会根据设备屏幕大小将其推下或推出视图。

https://i.stack.imgur.com/t0yo0.png

https://i.stack.imgur.com/biNIW.jpg

我可以"hack"它,但我宁愿不这样做...

xmlns:tools="http://schemas.android.com/tools"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:padding="16dp"

android:orientation="vertical"

tools:context="MapFragment">

android:layout_height="wrap_content"

android:layout_width="wrap_content"

android:src="@drawable/oncmap"/>

android:layout_height="wrap_content"

android:layout_width="fill_parent"

android:text="Neptune"

style="@style/sectionHeader"/>

android:layout_height="wrap_content"

android:layout_width="fill_parent"

android:paddingLeft="8dp"

android:paddingRight="8dp"

android:paddingTop="16dp"

android:text="@string/info"

style="@style/text"/>

0