I have a listview with some items. I would like to get the text from the selected item.
Here is my list adapter and the onItemClickListener:
ListView
It is as simple as that
@Override
public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
TextView text1 = (TextView) findViewById(R.id.Text1);
TextView text2 = (TextView) findViewById(R.id.Text2);
String txt_1 = ""+text1.getText().toString().trim();
String txt_2 = ""+text2.getText().toString().trim();
//Other_Related_Work
}
});