嘿,我希望在 ListView 中发生更改,例如列表视图中 TextView 上的文本更改。但这不应该在 ItemClick 上发生它应该在 restoreInstance 状态下发生任何帮助将不胜感激这是我的代码
@Override
public void onRestoreInstanceState(Bundle savedInstanceState){
super.onRestoreInstanceState(savedInstanceState);
View v1 = inventoryList.getChildAt(2);
if(v1 != null){
TextView tx = (TextView) v1.findViewById(R.id.txt_location);
tx.setText("why does this not work");
}
}