我正在嘗試進入Android開發之路。我正在使用Eclipse Helios。 GUI設計軟件似乎無法設計某些元素層次結構。例如:Android,帶有Eclipse的GUI設計,佈局 - >查看 - >佈局
<?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">
<ScrollView android:id="@+id/ScrollView01"
android:layout_width="fill_parent" android:layout_height="110px">
<LinearLayout android:id="@+id/LinearLayout02"
android:layout_width="wrap_content" android:layout_height="30px"
android:orientation="vertical">
</LinearLayout>
</ScrollView>
</LinearLayout>
我一直無法在GUI設計師來設計這種結構。我將一個LinearLayout拖動到設計框架上,將ScrollView拖到它上面,然後將LinearLayout拖到頂部。總是,這將作爲第一個LinearLayout的子元素插入,而不是ScrollView。然而,在滾動視圖this example,這似乎是正確的。
我做錯了什麼?我將如何使用GUI設計器來設計這個結構?或者這是唯一可能的直接XML操作?
謝謝。
GUI設計者根本不是很好。習慣於在xml中執行它也會幫助您在應用程序的其他方面。我認爲他們可能會在3.0 – Jems 2011-01-27 13:03:32