I am using the following code shows me the position of a text within a listview. I want to display a text or string if i write the number of position in a textedit.
In short... If i write the position number of the item from the listview it will give me the result of the text or string in that certain position.
public void onClick(View v){
try {
View parentRow = (View) v.getParent();
list = (ListView) parentRow.getParent();
final int position = lista.getPositionForView(parentRow);
Toast.makeText(getBaseContext(),"The "+position, Toast.LENGTH_SHORT).show();
} catch (Exception e) {
e.printStackTrace();
}
}