0
我目前在整個我的應用程序中使用了一大堆帶有自定義佈局的子類CursorAdapters,它們用一個SQLite查詢返回的光標填充它們,然後讓它們填充我的ListViewAndroid - CursorAdapter-ish子類,用於ListView
setListAdapter(new SearchAdapter(this, searchCursor));
反正我有可以得到相同的行爲,但不是傳遞一個光標通在
ArrayList<String[]>
會不會有不同的類繼承下來? (很明顯)或者,我應該以某種方式將ArrayList轉換爲光標?或者,有沒有一種我錯過的方法?
謝謝!
你會碰巧指向我的教程的方向,膨脹佈局,而不是使用像本教程一樣的類:http://thinkandroid.wordpress.com/2010/01/13/custom -baseadapters /?如果可能的話,我想繼續使用CursorAdapter的newView()/ bindView()方法。 – Josh
這樣做:http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List14.html,非常感謝! – Josh
是的相當於使用視圖持有人結合視圖標記。你的第二篇文章絕對是你需要的。 – DArkO