ListView

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

ListView

Postby martines » Sun Dec 06, 2009 8:41 pm

Hey,
I want to programm an easy Programm which saves and reads Data from an SQL-database an insert them into an ListView...
but I don't know how to handle a listView!
An easy Code like
Code: Select all
public class test extends Activity{
@Override
public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        TextView tv = new TextView(this);
   ListView lv = new ListView(this);
   tv.setText("1235");
   lv.addHeaderView(tv);
   this.setContentView(lv);
}

but starting the programm nothing appears on the Android-emulator!
Whats wrong? Thanks for helping!!
Martin
martines
Freshman
Freshman
 
Posts: 3
Joined: Sun Dec 06, 2009 8:36 pm

Top

Re: ListView

Postby jagtap.jj1 » Tue Dec 08, 2009 6:50 am

Take the help of sample code http://developer.android.com/guide/samp ... index.html
which uses Db as well as list view
java-android developer
User avatar
jagtap.jj1
Senior Developer
Senior Developer
 
Posts: 124
Joined: Fri Aug 22, 2008 11:52 am
Location: India(Mumbai)

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 11 guests