Hi,
I am a beginner in android dev and I was wondering if I could get some
help here.
So basically I have an xml file from which I grab data. I store all
this data in a string array. Now I need to print this array onto a
textview with an id=printHere
I need some guidance as to how I can achieve this.
Here is a snippet of my sample code.
int numberOfEntries = 5;
String demoArray[] = new String[5];
for(int i=1;i<5;i++)
{
demoArray[i]={...I call an object here that gets the
information from the xml file and assigns it to the demoArray};
}
for(int i=1;i<numberOfEntries;i++)
{
TextView displaySample= (TextView)findViewById(R.id.printHere);
displaySample.setText(demoArray[i]);
}
Now as per my understanding say if it prints entry 1, when it prints
entry 2 it overwrites entry 1 and when it prints entry3 it overwrite
entry 2 and so on. Is there a way I can print all 5 without
overwriting the other?
Thanks in advance
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en