多個ListView 獲取選中的數據

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

相關文章
相關標籤/搜索