从gallery中获取图片
步骤:
步骤一:
// 激活系统图库应用,选择一张图片
Intent intent = new Intent();
// 活动操作:选择一个项目从数据,返回被选中
intent.setAction(Intent.ACTION_PICK);
// 设置意图的类型
intent.setType("image/*");
// 设置开启意图
// 设...
分类:
移动开发 时间:
2014-06-20 11:22:45
阅读次数:
308
1.格式:父标签:描写叙述:一个必须包括一或一个以上的.假设不包括则不会有Intent被拦截。參数:android:name表示的是action的名称,一些标准的action已经在Intent类中定义了,能够查询Intent的api查看。能够通过
"android.intent.action.*"来...
分类:
移动开发 时间:
2014-06-06 20:13:15
阅读次数:
273
前言——项目中需要用到对用户头像的裁剪和上传功能。关于裁剪,一开始是想自己来做,但是觉得这个东西应该谷歌有开发吧,于是一搜索官方文档,果然有。于是,就果断无耻地用了Android
自带有关于照片的自由裁剪。因为时间太紧,虽然不太华丽,但是胜在能用,节省时间嘛。
具体是通过 Intent
的action来实现的。
关键代码如下:
public void imageCut(Uri...
分类:
移动开发 时间:
2014-06-05 03:32:58
阅读次数:
240
1 //以separator为节点分割字符串2 - (NSArray
*)componentsSeparatedByString:(NSString *)separator;3 4 //NSString转换为const char
*5 NSString *str = @"abc";6 const c...
分类:
其他好文 时间:
2014-06-04 18:00:40
阅读次数:
198
本文章主要将通过意图触发内置的Camera应用程序来录制视频。
源代码:
布局文件:
activity_main:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:...
分类:
移动开发 时间:
2014-06-03 06:25:41
阅读次数:
249
最近好多朋友说adb 不支持发送中文的短信,也不知道为啥要用adb 来发送短信,昨天想到这个问题,所以修改了一下自己的adb,支持发送中文的短信了。
adb shell am start -a android.intent.action.SENDTO -d sms:10086 --es sms_body 中文
下载地址:
http://bcs.duapp.com/myandroi...
分类:
数据库 时间:
2014-06-03 04:04:20
阅读次数:
488
Intent intent = new Intent();
intent.setClass(School.this, Setting.class);
startActivity(intent);在纠结这个问题的时候也在考虑是不是 .setClass ...
分类:
其他好文 时间:
2014-06-02 17:34:52
阅读次数:
163
开始前先post出最简单的AndroidManifest.xml文件: Android核...
分类:
移动开发 时间:
2014-06-02 11:58:11
阅读次数:
266
MainActivity如下:
package come.on;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.V...
分类:
移动开发 时间:
2014-06-01 10:36:36
阅读次数:
345
1.
格式:
父标签:
描述:
一个必须包含一或一个以上的.如果不包含则不会有Intent被拦截。
参数:
android:name
表示的是action的名称,一些标准的action已经在Intent类中定义了,可以查询Intent的api查看。可以通过 "android.intent.action.*"来进行赋值。比如对于 ACTION_M...
分类:
移动开发 时间:
2014-06-01 06:00:50
阅读次数:
339