There are several ways to achieve this, and also depends on whether you get text from a simple ListView or from a Custom ListView (with custom_list_item.xml).
For a simple ListView
lv.setOnItemClickListener( OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
String text = lv.get(position).tostring().trim();
final String text = ((TextView)view).getText();
}});
Custom ListView
lv.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
TextView textView = (TextView) view.findViewById(R.id.list_content);
}});