Head First Android --- Intent
How to create the intent
You create an intent that specifies an action using the following syntax:where action is the type of activity action you want to perform.
Android provides you with a number of standard actions you can use. As an example,you can use Intent.ACTION_DIAL to dial a number,
Intent.ACTION_WEB_SEARCH to perform a web search, and Intent.ACTION_SEND to send a message. So, if you want to create an
intent that specifies you want to send a message, you use:
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_TEXT, messageText);
Head First Android --- Intent的更多相关文章
- android Intent介绍
Android中提供了Intent机制来协助应用间的交互与通讯,Intent负责对应用中一次操作的动作.动作涉及数据.附加数据进行描述,Android则根据此Intent的描述,负责找到对应的组件,将 ...
- android:Intent匹配action,category和data原则
1.当你在androidmanifest里面定义了一个或多个action时 你使用隐式意图其他activity或者service时,规定你隐式里面的action必须匹配XML中定义的action,可以 ...
- Android Intent
Intent在Android中的重要性不言而喻.本文主要总结下Intent使用过程中需要注意的一些问题. 1.隐式Intent AndroidManifest.xml声明时<intent-fil ...
- android intent和intent action大全
1.Intent的用法:(1)用Action跳转1,使用Action跳转,如果有一个程序的AndroidManifest.xml中的某一个 Activity的IntentFilter段中 定义了包含了 ...
- Android总结篇系列:Android Intent
Intent在Android中的重要性不言而喻.本文主要总结下Intent使用过程中需要注意的一些问题. 1.隐式Intent AndroidManifest.xml声明时<intent-fil ...
- 什么时候加上android.intent.category.DEFAULT
什么时候加上android.intent.category.DEFAULT 1.要弄清楚这个问题,首先需要弄明白什么是implicit(隐藏) intent什么是explicit(明确) intent ...
- (转)android.intent.action.MAIN与android.intent.category.LAUNCHER
android.intent.action.MAIN决定应用程序最先启动的Activity android.intent.category.LAUNCHER决定应用程序是否显示在程序列表里 在网上看到 ...
- android之android.intent.category.DEFAULT的用途和使用
1.要弄清楚这个问题,首先需要弄明白什么是implicit(隐藏) intent什么是explicit(明确) intent. Explicit Intent明确的指定了要启动的Acitivity , ...
- 理解android.intent.action.MAIN 与 android.intent.category.LAUNCHER
刚才看了一下sundy的视频<LLY110426_Android应用程序启动>,里面讲到luncher这个activity通过获取应用程序信息来加载应用程序,显示给用户,其中就是通过一个应 ...
- Android Intent的几种用法全面总结
Android Intent的几种用法全面总结 Intent, 用法 Intent应该算是Android中特有的东西.你可以在Intent中指定程序要执行的动作(比如:view,edit,dial), ...
随机推荐
- Eclipse常用注释设置
菜单:Window→Preferences→Java→Code Style→Code Template Files /** * @Title: ${file_name} * @Package ${pa ...
- webpack-loader是怎样炼成的
目录 啰嗦两句 loader 是干什么的 loader 的工具箱 --context loader 实战 啰嗦两句 学习这件事从学习动机上来看,可以分成两种情况:主动学习和被动学习.主动学习就是,某天 ...
- Java并发编程笔记之Timer源码分析
timer在JDK里面,是很早的一个API了.具有延时的,并具有周期性的任务,在newScheduledThreadPool出来之前我们一般会用Timer和TimerTask来做,但是Timer存在一 ...
- 记一次IDEA编译器调优
前言: 我们知道,IDEA是用Java写的,那么他肯定也存在虚拟机的调优的问题,那么今天我们就对它进行开刀. 下面是默认参数 位置在:C:\Program Files\JetBrains\Intell ...
- [TJOI 2018]智力竞赛
Description 题库链接 给出一张 \(m\) 个点的有向图.问可重最小路径覆盖是否 \(\leq n+1\) .若不,求最多用 \(n+1\) 条路径去覆盖,最大化未覆盖点点权最小值. \( ...
- [转]微擎人人商城m()函数调用model方法
本文转自:http://yangjunwei.com/a/3177.html 微擎人人商城p()函数可内部调用任意插件的函数 http://yangjunwei.com/a/3216.html
- C# 字符串拼接性能探索
本文通过ANTS Memory Profiler工具探索c#中+.string.Concat.string.Format.StringBuilder.Append四种方式进行字符串拼接时的性能. 本文 ...
- (3)Jquery1.8.3快速入门_jquery对象dom对象转换
1.Jquery 对象 dom对象的转化使用: 1.1.jquery 对象: 通过$()包装DOM对象后产生的对象. 1.2.jquery对象是Jquery独有的 ,可以使用jquery中的方法. 1 ...
- 【Java基础】11、java方法中只有值传递,没有引用传递
public class Example { String testString = new String("good"); char[] testCharArray = {'a' ...
- C++桥接模式【转】
https://www.cnblogs.com/jiese/p/3164940.html 将抽象部份与它的实现部份分离,使它们都可以独立地变化. 桥接模式号称设计模式中最难理解的模式之一,关键就是这个 ...