android回到home 2012-06-25 22:14 暂无评论 63 访问量 Android设备在按下Home键会自动切换回桌面,其实实现的方法很简单,由于Launcher捕获了Home键的按下action,我们直接发送个Intent给Launcher即可,代码如下: 123 Intent intent= new Intent(Intent.ACTION_MAIN);intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); //如果是服务里调用,必须加入new task标识intent.addCategory(Intent.CATEGORY_HOME); 上一篇 android按home键lancher重启 eclipse下好用的vi插件viPlugin2.5破解方法 下一篇
0 条评论