public void onItemClick(AdapterView<?> parent, View v, int position, long id) { TextView c = (TextView) v.findViewById(R.id.tvPopUpItem); String playerChanged = c.getText().toString(); Toast.makeText(Settings.this,playerChanged, Toast.LENGTH_SHORT).show(); }
onItemClick返回的View就是我们选中行的视图,再根据id查找当前视图中的控件,准确无疑!!!