我想在用代码直接在桌面上添加widget,比如我点击了我activity里的一个按钮,程序就直接将widget加到桌面上了,求指导! androidwidget自动添加 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 widget我已经写好。目前只能手动添加到桌面 采用short cut Intent ,也就是创建快捷方式, Intent intent = new Intent(); intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bitmap); intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent); intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, displayName);楼主可以网上搜搜,很多这样的例子代码。 android: Json数据解析出错 weather应用crash问题 tabhost如何去除底部下划线 求解Preference布局问题 android 接口调用 Android联网经常失败的问题 nofication上面的文字通知可以滚动起来吗?? Android 滚动条 ProgressBar 如何停止 急求!!!如何不用shape设置listview item的圆角!!! 类似汽车之家这样的对比车型可以左右滑动效果怎么实现的 在手机上获取wifi强度的方法有哪些?谢谢! WedView双击缩小发大。
Intent intent = new Intent();
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON, bitmap);
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, displayName);
楼主可以网上搜搜,很多这样的例子代码。