我有一个水平的LinearLayout
(在另一个LinearLayout
里面),它包含几个ImageView
s。出于某种原因,我只是在运行应用程序时看不到它们。我的ImageViews在哪里?
这里是我的布局:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="@drawable/background">
<TextView android:layout_height="wrap_content"
android:layout_width="wrap_content" android:textSize="20dp"
android:text="A bunch of text"
android:textColor="#000000" android:layout_gravity="center_horizontal"
android:padding="10dp" android:background="#0000FF"/>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_height="wrap_content" android:layout_width="fill_parent"
android:orientation="horizontal">
<ImageView android:layout_width="wrap_content"
android:layout_height="75dp"
android:src="@drawable/image1"
android:scaleType="centerCrop" android:background="#0000FF"/>
<ImageView android:layout_width="wrap_content" android:layout_height="75dp"
android:layout_weight="1" android:src="@drawable/image2"
android:scaleType="centerCrop" />
<ImageView android:layout_width="wrap_content" android:layout_height="75dp"
android:layout_weight="1" android:src="@drawable/image3"
android:scaleType="centerCrop" />
</LinearLayout>
</LinearLayout>
宾果!总是忘记这个... – LuxuryMode 2011-06-01 02:27:59