Android page close
阿神
阿神 2017-05-16 13:23:31
0
3
754

A page startactivityforresult jumps to page B, page B changes data and jumps back to page A. How to close the previous page A?

阿神
阿神

闭关修行中......

reply all(3)
小葫芦

Go to the manifest.xml file and change the startup mode of activity A to the following

android:launchMode="singleTask"
漂亮男人

A Activity has a method called onActivityResult(). When the Activity started by startActivityForResult() is launched, it will enter this function. You can do relevant processing in it and then finish();

You can go to Baidu yourself for the specific method. It is really inconvenient for you to find it on your mobile phone.

某草草

A -> startActivityForResult() -> B
Why don’t I understand the problem? You use startActivityForResult in A to start B. Doesn’t this mean that you expect B to return results to A? Why does A have to be closed when B returns?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template