Click here to Skip to main content
15,893,663 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Am Having Details in Listview.Now i want to pass single value in EditText by clicking Single Row Of ListvIew.. For Example..

Am Having Three Data Per Row.. like

Android

Iphone

Windows.

By clicking This Row i Want To get the Android Name in EditText
Posted

1 solution

Use this tutorial
listview_tutorial[^]


U can add listener to listview (setOnItemClickListener)
Like this:-

listview.setOnItemClickListener(new AdapterView.OnItemClickListener() {

@Override
public void onItemClick(AdapterView int position, long id) {
final Stringname = (String) listview.get(position);
edittext.setText(name);
}
});
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900