我在做一个练习,animation的练习,上面一张图,下面一个button,但是图出来,button不出来,,,我换成小图,可以看到button。但是换成大图就看不到button。代码如下。我也修改过layout_width和layout_height,但是还是没用各位帮忙刚看一下谢谢咯
我试过把button放在上面就可以显示。想知道原因求解3Q<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
><ImageView
android:id="@+id/iv"
android:src="@drawable/p1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
/>
<Button
android:id="@+id/btn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Click"
/>
</LinearLayout>
我试过把button放在上面就可以显示。想知道原因求解3Q<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
><ImageView
android:id="@+id/iv"
android:src="@drawable/p1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
/>
<Button
android:id="@+id/btn"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Click"
/>
</LinearLayout>
控件自动适应图片大小
可能是图片过大了 按钮无法现实吧加一个ScrollView吧
android:scrollbars="vertical" 属性,向下滚动一下就能看到了