当我尝试在模拟器上使用ImageView显示图像时,它显示出来。 一旦我添加一个按钮,图像不显示。ImageView未显示在Android上
我不知道这是否会有所帮助,但我的XML时,它的工作:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/ImageView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"/>
</LinearLayout>
和不工作:你必须做
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout android:id="@+id/LinearLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android">
<Button
android:id="@+id/backbutton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Back"/>
<ImageView android:id="@+id/ImageView01"
android:layout_height="wrap_content"
android:layout_width="fill_parent"/>
</LinearLayout>
哦好吧谢谢! – 2011-03-21 05:30:05