简体   繁体   中英

Calling the Right Fragment from my Parent Activity class when Share from Device Image Gallery

I have a Main activity which is the base activity for my other fragments that implement this basic structure.

In one of my fragments I have a pick from Gallery. However, I also want the onActivityResult(int,int,Intent) method inside my Fragment Java class to be trigger after a user selects which photo to be shared from the Gallery.

Any ideas how I might achieve this? Thanks in advance!

override the onActivityResult method in your fragment file. And, use the startActivityForResult method when you are launching the gallery app.

For those methods, googling!

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM