小猪的Android入门之路 Day 6
Android应用核心:Intent(意图)
-----转载请注明出处:coder-pig
本节引言:
通过前面的学习中,我们都知道可以调用startActivity(intent)或者startActivityForResult(intent)
来启动一个新的Activity了,他们的参数都是Intent类型的实例,那么这个Intent是什么东西呢?
有...
分类:
移动开发 时间:
2014-08-12 19:02:04
阅读次数:
234
1、Intents and Intent Filters(意图和意图过滤器)
1.0、Intents and Intent Filters(意图和意图过滤器)
AnIntentis a messaging object you can use to request an action from an...
分类:
移动开发 时间:
2014-08-12 18:36:24
阅读次数:
422
前言
大家可能遇到了这样的情况,调用Camera,然后指定自定义的保存路径,结果返回的Intent为空。我们来分析一下原因。
分析
首先看Camera的部分逻辑,在源码中的Camera.java的doAttach()方法里面。
// First handle the no crop case -- just return the value. If the
// caller sp...
分类:
其他好文 时间:
2014-08-12 17:30:54
阅读次数:
276
Linux shell 读取一行方法一通过指定IFS--Internal Field Separator,IFS默认情况下是,可以下脚本中设定IFS值DEMO 1$cat t1.txt abcfd $cat test_IFS.sh #! /bin/shIFS="c"for LINE in `ca.....
分类:
系统相关 时间:
2014-08-11 20:32:42
阅读次数:
384
Intent dataintent=new Intent(Intent.ACTION_SEND); dataintent.putExtra(Intent.EXTRA_EMAIL, to);//to为指定邮箱地址 dataintent.putExtra(Intent.EXTRA_TEXT,...
分类:
其他好文 时间:
2014-08-11 17:42:12
阅读次数:
197
分享到微信朋友圈代码。不好用,最后选择了shareSdk。 private static void shareToTimeLine(File file) { Intent intent = new Intent(); ComponentName comp = new...
分类:
移动开发 时间:
2014-08-11 17:21:53
阅读次数:
348
Intent intent = new Intent();
intent.setAction("android.intent.action.VIEW");
intent.addCategory("android.intent.category.DEFAULT");
intent.setDataAndType(Uri.fromFile(t), "application/vnd.android.pac...
分类:
其他好文 时间:
2014-08-11 15:01:02
阅读次数:
211
自己刚学Android的时候在这上面花了不少时间,资料没少找。学习别人的“关键代码”,自己写起来不是缺这就是缺那的。希望后来的同学在这上面少浪费些时间。
其实很简单,就是用一个Android的Intent实现Button的页面跳转,单击图1的Button,进入图2
图1
图2
首先建立一个Android Application project,主类名为MainActivit...
分类:
其他好文 时间:
2014-08-10 21:34:10
阅读次数:
376
一 常量 /** * 主要定义了路径常量,项目中经常用到 **/ define('PHPCMS_PATH',dirname(__FILE__).DIRECTORY_SEPARATOR);// 项目根目录 define('IN_PHPCMS',true); ...
分类:
Web程序 时间:
2014-08-10 21:11:40
阅读次数:
374
package data;public class Sort { String endline = System.getProperty("line.separator"); //选择排序 public void selectSort(int[] arr){ int len = arr.leng.....
分类:
其他好文 时间:
2014-08-10 15:23:50
阅读次数:
209