如何从片段调用片段? [英] How to call fragment from fragment?
问题描述
我用的是片段
,和我在同一个片段
它是开放正常打开另一种观点,但问题是,我不能说如何回到第一个观点。
I use the fragment
, and i open another view in the same fragment
it's open properly, But the problem is, I can't get that how get back to the first view.
如果我叫片段
通过第一个分段的对象,它删除旧值,它是想在 EDITTEXT
或其他数据。
If i call fragment
by the object of first fragment it remove the older value which is like in the Edittext
or other data.
任何一个可以帮助我吗?
Can any one Help me?
这工作就像
我先打电话片段名的 fragone 的,并插入该部分价值的EditText
,现在我想用片段中打开另一个观点同名的 fragsecond 的,现在我想在去的 fragone 的,我那么什么可以做的是????
I call first fragment name fragone, and insert some value in this in edittext
, now i want to open another view using fragment in the same named fragsecond, Now i want to go at fragone, So what can I do for that????
推荐答案
我用片段上的Android3.0在(标签应用)我得到这个为工作。
I use Fragment on android3.0(Tab app) in that i got this as worked.
Fragment duedateFrag = new DuedateFrag(true);
FragmentTransaction ft = getFragmentManager().beginTransaction();
ft.replace(R.id.main_tasklistdetail_lay, duedateFrag);
ft.addToBackStack(null);
ft.commit();
这篇关于如何从片段调用片段?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!