简体   繁体   中英

How to show ShareActionProvider in layout instead of menu item?

In my application I want to show all the share action provider inside my layout instead of in menu item.I can easily show those using ShareActionProvider but as per project requirement I need to show in Listview inside my layout. I want to display all the possible share option inside my layout.

I want this kind of screen to be displayed 线框

Following example shows you how to send text to another application.Put this code on event when you want the app chooser to share.

Intent sendIntent = new Intent();
sendIntent.setAction(Intent.ACTION_SEND);
sendIntent.setType("text/plain");
startActivity(sendIntent);

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