问题描述
我有一个片段
和活动
。还有一些领域和按钮
在片段
。当我点击片段的按钮
然后我想去一个活动
。在该活动我还有一个按钮
。当我点击该按钮,我想从$ p返回$ psent 活动
到previous 片段
。每到事情的作品fine.what我需要的是我想重建片段
当我从活动
..即在片段如果我输入任何内容 edit_text
传递给活动
之前,这是也presented当我从活动
返回。(在片段
是一样的,我从<$如何离开C $ C>片段),这是我不想。我希望有一个新的page.i想重新片段
当我回来活动..我需要选择领域newly..can任何一个事先提出任何help..thanks ..
I have a fragment
and an activity
.there are some fields and an button
in fragment
.When i click an button in fragment
then i want to go to an activity
.In that activity i have another button
.when i click on that button i want to return from the present activity
to the previous fragment
.Every thing works fine.what i need is i want to recreate the fragment
when i return to the fragment from the activity
..i.e,for example in the fragment
if i enter anything in the edit_text
before passing to the activity
, which is also presented when i returned from the activity
.(the fragment
is same as how i left from fragment
) which is i don't want .i want a fresh page.i want to recreate a fragment
when i returned from activity ..i need to select fields newly..can any one suggest any help..thanks in advance..
推荐答案
尝试使用主FragmentActivity和片段与片段之间的交易安排。我没有见到一个Addlication与活动和片段的例子。
Try to use main FragmentActivity and Fragments and organize transactions between fragments. I didn't meet examples with Activity and Fragment in one Addlication.
这篇关于片段和活动之间的交易的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!