Hi Guys,

I have a question. Can you please help me out.

There s some data pulling from Database. I have made a structure and stored
in a String Object.
Could you please help me out how to use this String and show the data as a
ListView.
Please have a look. This is how I am showing data as of now.

When click on "SHOW" button , the following method  will get execute..

*public void showListData(View button){*
*    setContentView(R.layout.listview);*
*        final TextView output = (TextView) findViewById(R.id.listitem);*
*        StringBuilder sb = new StringBuilder();*
*        DBOpenHelper dbObj=new DBOpenHelper(this);*
*        dbObj.open();*
*        Cursor c = dbObj.getAllDetails();*
*        if (c.moveToFirst()){*
*           do {*
*           sb.append("Heading:\n "+c.getString(0)+"\nDescription:\n
"+c.getString(1)+"\n\n");*
*           } while (c.moveToNext());*
*        }*
*        output.setText(sb.toString());*
*    }*

Thanks,
KIRANKUMARKENDOLE

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to