android - ParseQueryAdapter for ListFragment -
as parsequeryadapter meant used activity - general design idea using parsequeryadapter listfragment? want display custom list view.
i've tried use parsequeryadapter listfragment, images not displayed properly. if use exact code activity, images load correctly.
how can use parsequeryadapterin conjunction listfragment?
i've posted general code, text query loads wonderfully in list, images don't load or when do..take long time show up.
<relativelayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <listview android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@android:id/list" android:divider="@null" android:dividerheight="0px" /> </relativelayout> public class placestab extends listfragment { ... @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view rootview = inflater.inflate(r.layout.places_tab, container, false); mainadapter = new parsequeryadapter<parseobject>(getactivity(), “places”); mainadapter.settextkey("name"); mainadapter.setimagekey(“placeimage"); listview = (listview) rootview.findviewbyid(android.r.id.list); listview.setadapter(mainadapter); mainadapter.loadobjects(); return rootview; } }//end class
Comments
Post a Comment