Java Code Examples for android.widget.ListView.getId()

The following are Jave code examples for showing how to use getId() of the android.widget.ListView class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: open-rmbt   File: ResultQoSDetailView.java   View Source Code Vote up 5 votes
@SuppressWarnings("unchecked")
@Override
public void onItemClick(AdapterView<?> adapter, View view, int position, long id) {
	ListView listView = (ListView) adapter;
	HashMap<String, String> item = (HashMap<String, String>) listView.getAdapter().getItem(position);
	if (listView.getId() == R.id.qos_success_list) {
		activity.showExpandedResultDetail(results, DetailType.OK, Integer.valueOf(item.get("index")));
	}
	else if (listView.getId() == R.id.qos_error_list) {
		activity.showExpandedResultDetail(results, DetailType.FAIL, Integer.valueOf(item.get("index")));
	}
}