I have this issue that I have a list of A
and I can add new A
, so I startactivityforresult
activity with form for A
and there is also a button for selecting AType
, so I startactivityforresult
another activity with AType
list.
Problem comes when I do post back result in AType
list.
Intent intent = new Intent();
intent.putExtra("aType", aType);
setResult(RESULT_OK, intent);
finish();
And the result is pushed back to A
List instead of A
Form.
Is this normal behavior or I am doing something wrong?
If this is normal behavior, what can I do to push back result to A
Form instead of A
List.
If you need more code - I will provide, but I find it now irrelevant.
I have found out that A
Form finishes after startactivityforresult
call. But why?
Activity1:
Intent intent-=new Intent(this,myclass.class);
startActivityforResult(intent,100);
Override the method OnACtivity result in Activity 1
Activity2:
setResult(RESULT_OK);
finish();
原来我在AndroidManifest.xml
具有活动A Form
noHistory="true"
,这就是为什么它返回到A List
Activity的原因
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.