我有两个微调器,第二个用于链接第一个带位置和列表视图,当你点击一个与位置链接的项目时显示一个CV,我想要替换它将链接到id ,我该怎么办?
这是我的代码微调器
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> parent, View view, int
position, long id) {
if(arrayListTache.size() > position)
{
spinner_tache.setSelection(position);
pos = position;
valueInteger = arrayListInteger.get(position);
}
}
@Override
public void onNothingSelected(AdapterView<?> parent) {
}
});
我的代码onclick list view
SubjectListView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
@Override
public void onItemClick(AdapterView<?> parent, View view, int
pos, long id) {
String selectedItem =
parent.getItemAtPosition(pos).toString();
Intent intent = new
Intent(getApplicationContext(),Main2Activity.class);
intent.putExtra("Position" , String.valueOf(id));
startActivity(intent);
// insert();
}
});