首先,我發現了很多如何從數據庫中獲取數據並將其放置到列表中的例子,但是這似乎都是針對ListActivites的。Android:SQLite和ListViews
我的列表是UI的一部分,因此我不能使用ListActivity,因爲它不會佔用整個屏幕(或者我可以嗎?)。
這是UI:
<SlidingDrawer android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/Drawer"
android:orientation="vertical"
android:handle="@+id/handle"
android:content="@+id/content">
<ImageView
android:id="@id/handle"
android:src="@drawable/tray_handle_normal"
android:layout_height="wrap_content" android:layout_width="wrap_content"/>
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@id/content" android:background="@color/black">
<ListView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/List">
</ListView>
</RelativeLayout>
那麼,從什麼香港專業教育學院讀我需要從數據庫中抓取數據,然後將其放置到某種數組,然後使用數組適配器填寫列表視圖。那是對的嗎?如果是這樣,是否有一些示例代碼,因爲我可以找到的代碼是與ListActivites相關的代碼。
啊,我想知道如何使用列表活動。謝謝,這回答它有點。 剛發佈解決方案後,我發現如何做到這一點...其始終的方式.....! – Tom 2009-11-18 22:40:52