Android分享内容到其他应用,调用系统的Dialog或者ActionBar的弹窗都不太自由,限制太大,这里我提供一个完全自定界面的,可以弹窗,也可以直接在Activity或者Fragment里边自定义界面。这里展示一个关键类的代码,做了封装处理,我写两个一个Demo,免费源码在:http://download.csdn.net/detail/yanzhenjie1003/8565449
/**
* @author YOLANDA
* @Time 2015年4月5日 下午1:03:11
*/
public class ShareUtil {
/**
* 拿到要显示的应用数据
* @author YOLANDA
* @param context
* @param type
* @return
*/
public static ArrayList getShowData(Context context, List resolveInfos){
ArrayList drawableItems = new ArrayList();
PackageManager mPackageManager = context.getPackageManager();
for (int i = 0; i < resolveInfos.size(); i++) {
ResolveInfo info = resolveInfos.get(i);
ListDrawableItem dialogItemEntity = new L