tag:blogger.com,1999:blog-89878749563391212.post5567536808389284919..comments2024-03-25T17:53:11.127-07:00Comments on Android-er: Implement onListItemClick() of ListActivityUnknownnoreply@blogger.comBlogger3125tag:blogger.com,1999:blog-89878749563391212.post-10013387649833554492011-11-14T04:52:13.379-08:002011-11-14T04:52:13.379-08:00I want to do:
protected void onListItemClick (List...I want to do:<br />protected void onListItemClick (ListView l, View v, int position, long id){<br /> super.onListItemClick(l, v, position, id);<br /> setContentView(R.layout.mylayout);<br />}<br /><br />whatever mylayout does contain, i want to move to it.I get strange exceptions in the LogCat, trying to solve them but i couldn't get where I want.How could I solve this?Alexhttps://www.blogger.com/profile/06583275906821782052noreply@blogger.comtag:blogger.com,1999:blog-89878749563391212.post-46692098062970123232011-09-11T13:20:37.584-07:002011-09-11T13:20:37.584-07:00Hello Hélio,
The arguments are passed by Android ...Hello Hélio,<br /><br />The arguments are passed by Android S to you, not defined by you. Please read here: <a href="http://developer.android.com/reference/android/app/ListActivity.html#onListItemClick(android.widget.ListView,%20android.view.View,%20int,%20long)" rel="nofollow">http://developer.android.com/reference/android/app/ListActivity.html#onListItemClick(android.widget.ListView, android.view.View, int, long)</a>.Erikhttps://www.blogger.com/profile/04983894331825656853noreply@blogger.comtag:blogger.com,1999:blog-89878749563391212.post-13373043666903558622011-09-10T07:58:08.167-07:002011-09-10T07:58:08.167-07:00how to I define an argument, an id for example, in...how to I define an argument, an id for example, instead of index of array? I noted that the id that passed by parameter of onListItemClick method is Index of arrayHéliohttps://www.blogger.com/profile/07948478814259674091noreply@blogger.com