我有一个带有ListView的Fragment,如果单击一个listItem,它必须转到NewFragment。我这样做:
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
NewFragment newFrag = NewFragment.newInstance("data1","data2");
getFragmentManager().beginTransaction()
.replace(R.id.container, newFrag, this.getTag())
.addToBackStack(null)
.commit();
}
它显示NewFragment并且ListView不可见,但它仍然是可点击的。如何实现ListView不可见且不可点击?