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), ...
随机推荐
- Dapper内部分享ppt
http://www.knowsky.com/887446.htmlhttp://www.tritac.com/bp-24-dapper-net-by-examplehttp://www.cnblog ...
- 【适合公司业务】全网最详细的IDEA里如何正确新建【普通或者Maven】的Java web项目并发布到Tomcat上运行成功【博主强烈推荐】(类似eclipse里同一个workspace下【多个子项目】并存)(图文详解)
不多说,直接上干货! 首先,大家要明确,IDEA.Eclipse和MyEclipse等编辑器之间的新建和运行手法是不一样的. 如果是在Myeclipse里,则是File -> new -> ...
- 使用webpack将es6 es7转换成es2015
第一步:安装模块化包 cnpm install --save-dev babel-core babel-loader babel-preset-es2015 babel-preset-react 第二 ...
- 最好用的lua编辑器--------emmylua使用汇总
最好的lua编辑器Emmylua,欢迎打脸 官方文档 https://emmylua.github.io/zh_CN/ github https://github.com/EmmyLua ...
- 高并发连接导致打开文件过多:java.io.IOException: Too many open files 解决方法
用 CentOS 做 API 接口服务器供其他终端调用时,并发量高会报错:java.io.IOException: Too many open files. 其原因是在 Linux 下默认的Socke ...
- [SHOI2006] 有色图
Description 给一张 \(n\) 个点的无向完全图,同时还有 \(m\) 种颜色.要求给每条边染色,问有多少种不同的染色方案.两种方案不同当且仅当顶点标号任意重排后不同.\(n\leq 53 ...
- SpringMVC Hello World
前言 新年伊始,元宵佳节,窗外灯火通明,炮声连连.北漂以来第一次一个人在北京过十五. 切入正题,收假后一边要赶项目进度还要学习java,so在元宵佳节之际写了第一篇SpringMVC Hello Wo ...
- 【转】java String.split()函数的用法分析
在java.lang包中有String.split()方法的原型是: public String[] split(String regex, int limit) split函数是用于使用特定的切 ...
- 《深入理解Java虚拟机》(一)Java虚拟机发展史
Java虚拟机发展史 1.Sun Classic/Exact VM 1.Sun Classic:世界第一款商用Java虚拟机. 2.Exact VM:准确式GC:虚拟机可以知道内存中的某个位置的数据具 ...
- c# 封装Dapper操作类
using Dapper; using DapperExtensions; using System.Collections.Generic; using System.Configuration; ...