java - Displaying JSON List in honeycomb layout -
i trying display json list in honeycomb. thing is, have fragment , cannot change class extend listactivity or listfragment. however, if instruct me start(is new class need or there simple way display json on layout)?
public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { /* * (new thread(new runnable() { * * @override public void run() { fetchpage(); } })).start(); */ list<jsonobject> testing = new arraylist<jsonobject>(); (new thread(new runnable() { public void run() { list<jsonobject> test123 = new arraylist<jsonobject>(); rssreader reader = new rssreader(); test123 = reader.getlatestrssfeed(); iterator<jsonobject> iterator = test123.iterator(); while (iterator.hasnext()) { system.out.println(iterator.next()); } system.out.println("test"); } })).start(); return inflater.inflate(r.layout.newspaper_fragment, container, false); } }
and here layout have far
<?xml version="1.0" encoding="utf-8"?> <relativelayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/wallpaper"> <!-- list view --> </relativelayout>
any appreciated.
Comments
Post a Comment