public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) { TextView text = (TextView) view.findViewById(R.id.Gi_item_name); Toast.makeText(this, text.getText(), Toast.LENGTH_SHORT).show(); }
直接用View來取值this
Gi_item_name 是控件idget