Android返回Home桌面
2015-10-28 14:25
441 查看
通过Intent实现,为Intent的action和category设置相应的属性,指定Home桌面为启动的activity,再启动即可。
Intent intent = new Intent();
intent.setAction(Intent.ACTION_MAIN);
intent.setCategorty(Intent.CATEGORY_HOME);
startActivity(intent);
Intent intent = new Intent();
intent.setAction(Intent.ACTION_MAIN);
intent.setCategorty(Intent.CATEGORY_HOME);
startActivity(intent);
相关文章推荐
- java对世界各个时区(TimeZone)的通用转换处理方法(转载)
- java-注解annotation
- java-模拟tomcat服务器
- java-用HttpURLConnection发送Http请求.
- java-WEB中的监听器Lisener
- 使用C++实现JNI接口需要注意的事项
- Android IPC进程间通讯机制
- Android Manifest 用法
- [转载]Activity中ConfigChanges属性的用法
- Android之获取手机上的图片和视频缩略图thumbnails
- Android之使用Http协议实现文件上传功能
- Android学习笔记(二九):嵌入浏览器
- android string.xml文件中的整型和string型代替
- i-jetty环境搭配与编译
- android之定时器AlarmManager
- android wifi 无线调试
- Android Native 绘图方法