I have a button in main activity which activates another activity
whose code is as follows:
----------------------------------------------------------------------------------------------------------------------------------
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.listplaceholder);
ArrayList<HashMap<String, String>> mylist = new
ArrayList<HashMap<String, String>>();
String xml = XMLfunctions.getXML();
Document doc = XMLfunctions.XMLfromString(xml);
int numResults = XMLfunctions.numResults(doc);
if((numResults <= 0)){
finish();
}
NodeList nodes = doc.getElementsByTagName("tournaments");
for (int i = 0; i < nodes.getLength(); i++) {
HashMap<String, String> map = new HashMap<String,
String>();
Element e = (Element)nodes.item(i);
map.put("id", XMLfunctions.getValue(e, "id"));
map.put("name", "" + XMLfunctions.getValue(e, "name"));
map.put("date", "Date Started: " + XMLfunctions.getValue(e,
"date"));
map.put("nextmatch", "Next Match: " +
XMLfunctions.getValue(e, "nextmatch"));
mylist.add(map);
}
ListAdapter adapter = new SimpleAdapter(this, mylist ,
R.layout.main1,
new String[] { "name", "date","nextmatch" },
new int[] { R.id.item_title,
R.id.item_subtitle,R.id.item_subsubtitle });
setListAdapter(adapter);
final ListView lv = getListView();
lv.setTextFilterEnabled(true);
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int
position, long id) {
if(position==0)
{
Intent intent=new
Intent(Ongoingtournaments.this,info1.class);
startActivity(intent);
}
}
the XMLfunctions class do the work of XML parsing.....................
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
after clicking the button my logcat out put says "ACTIVITY IDLE
TIMEOUT FOR HISTORYRECORD"
.
--
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