I have a list view with 15 items. When I click on any item I want to change the screen(Intent). how can I change the activity on item selected in android? any tutorial or source code?
You can use ListView's setOnItemClickListener, and start an new Activity in your implementation of this method. Following is sample code:
myListview.setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id){
// Start your Activity according to the item just clicked.
}
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With