Is it possible to display the following data from a SQL data database in a list view instead of the toast shown in the code below?
btnlist = (button) findViewById (R.id.btnlist); btnlist.setOnClickListener (New View.OnClickListener () {public void onClick (View v) {handler = new Datahandler (getBaseContext ()); String getName, getaddress, getDate, getTime, getSchoolName; getName = ""; getaddress = ""; GetDate = ""; GetTime = ""; getSchoolName = ""; Handlrkopen (); cursor C = handler. Ritrndeta (); // // if the actual data back to the data (CkmoveToFirst ()) {do { GetName = cgetstring (0); getaddress = cgetstring (1); getDate = cgetstring (2); gettime = cgetstring (3); getSchoolName = cgetstring (4);} while (c. Hiltounest ());} Handlrkclos ( ); Toast. GetBaseContext, "Name:" + G. etName + "Address:" + Recipient + " Procedure: "+ union-time +" Time: "+ union-time +" school: "+ Praptskulnam, toast. Elananacac_eloji). Show (); }}); }
From the list view, I assume that your name is the first line to be , The second row has the address, the third date and the third date? If so, then I can suggest that you actually create 10 textuals, 5 for label and 5 for data. If you need scrolling then you can put them in a scroll view once you see these text views on them with data to do with the data you have in the form of getName such as this .setText (...) is called.
The reason I say this to the typical usually use list views to be more consistent with the Android design is used to show a list of lists where different to the other line key Shows values like your contact It seems like you will always have five data points so we do not need to see a list overhead and a static set of text ideas will work exactly this purpose.
Comments
Post a Comment