首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

怎么在launcher2中启动一个自己的activity

2013-07-04 
如何在launcher2中启动一个自己的activity?在launcher2源码中加入自己定义的activity,然后想要在点击launc

如何在launcher2中启动一个自己的activity?
在launcher2源码中加入自己定义的activity,然后想要在点击launcher上的某个按钮后,跳到自己定义的那个activity,该如何实现?求大神帮忙解决,试了好多方法都不行 Launcher 源代码
[解决办法]
Intent intent = new Intent(Launcher.this, xxxx.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);

把这个加入你的button点击事件当中,Launcher.this代表的是当前Activity,xxxx是你写的activity名字。

热点排行