-1
我需要从片段中打开片段并使用导航抽屉。我知道使用哪种片段事务来处理这种事件,但是它调用了抽屉,而不是特定的片段。如何从其他片段调用片段?
任何帮助?
Fragment fragment= new ProfileFragment();
FragmentTransaction transaction = getFragmentManager().beginTransaction();
transaction.replace(R.id.fragment_navigation_drawer, fragment); // fragmen container id in first parameter is the container(Main layout id) of Activity
transaction.addToBackStack(null); // this will manage backstack
transaction.commit();
在这里发表您的代码。 –
你的问题是什么? –
我需要从其他片段的点击事件调用片段。 – Abhishek