我有以下XML佈局:這應該LinearLayout中使用Android:layout_height = 「WRAP_CONTENT」?
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:fillViewport="true" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent" // ==> here I get the error.
android:orientation="vertical" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Test"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_marginLeft="10dp"
android:layout_marginTop="5dp" />
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="2dip"
android:background="#298EB5"
android:orientation="horizontal" />
</LinearLayout>
</ScrollView>
但我得到的皮棉消息:
這LinearLayout中應該使用Android:layout_height = 「WRAP_CONTENT」
爲什麼我收到這條信息?
感謝老兄進行格式化。 –