常见Android Start Activity用法汇总
来源:互联网 发布:中国新歌声网络直播吗 编辑:程序博客网 时间:2024/04/29 17:23
//Calls another activity, by name, without passing dataIntent iExp = new Intent(this, ActivityToCall.class); //TODO Replace 'ActivityToCall' with the class name of the activity being calledstartActivity(iExp);
//Calls another activity, by action and category, without passing data//refer to AndroidManifest.xml<intent-filter> when determining the action and category of the activity to callIntent iImp = new Intent("actionName"); //TODO Replace 'actionName' as appropriate for your action (for example, Intent.ACTION_EDIT)iImp.addCategory("categoryName"); //TODO Replace 'categoryName' as appropriate for your category (for example, Intent.CATEGORY_DEFAULT)startActivity(iImp);
//Calls another activity, identified by action and category, passing data URL and a MIME type//The class calling the snippet code must implement the following method://protected void onActivityResult (int requestCode, int resultCode, Intent data) {}Intent iImp = new Intent();iImp.setAction("actionName"); //TODO Replace 'actionName' as appropriate for your action (for example, Intent.ACTION_EDIT)iImp.addCategory("categoryName"); //TODO Replace 'categoryName' as appropriate for your category (for example, Intent.CATEGORY_DEFAULT)//optional - set data and MIME type for the intentiImp.setDataAndType(Uri.parse("http://com.example.project/folder"), "text/plain"); //TODO Change URL and MIME type as appropriatestartActivityForResult(iImp, 0); //TODO The second parameter (here, zero) is the request code to be used in onActivityResult(); change this parameter to an appropriate value for your activ
- 常见Android Start Activity用法汇总
- Android activity属性汇总
- android常见bug汇总
- android 常见错误信息汇总
- Android常见错误汇总
- android常见错误汇总
- Android 常见错误汇总
- android常见错误汇总
- 常见Android知识点汇总
- Android 常见bug汇总
- Android常见错误汇总
- Android常见错误汇总
- Android常见知识汇总
- Android - Start new Activity & Pass value
- [Android] Start your activity after boot completed
- Android之activity属性汇总
- Android-Activity详解与汇总
- Android之activity属性汇总
- 用shell按年月创建目录
- Kconfig文件结构(图文)简介
- HDU1116(欧拉回路)
- 控制JFrame窗体的位置 居中或任意位置
- Mobius反演与树状数组
- 常见Android Start Activity用法汇总
- linux网络编程之posix 线程(一):线程模型、pthread 系列函数 和 简单多线程服务器端程序
- JAVA泛型中"? T K V E"的意思
- 对Linux0.11 中 进程0 和 进程1分析
- C++类中的4个特殊函数 - 缺省构造函数、拷贝构造函数、拷贝赋值操作符和析构函数
- 关于Unable to instantiate activity ComponentInfo错误解决方案
- Double_array trie
- http协议详解
- Qt phonon多媒体框架