You should be using commit() to start your transaction, not an Intent(), you also want to use replace() not add(): public void onItemClick(AdapterView<?> adapterView, View view, final int i, long l){ //Assuming that this creates a new fragment Fragment fr = new event_description(); FragmentManager fm = getFragmentManager(); FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.replace(R.id.page, fr, "TAG ID"); fragmentTransaction.commit();} 这篇关于片段不会启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-14 07:32