今天发现自己连Bundle类都没有搞清楚,于是花时间研究了一下。依据google官方的文档(http://developer.android.com/reference/android/os/Bundle.html)Bundle类是一个key-value对,“A mapping from Strin...
分类:
移动开发 时间:
2014-07-22 00:33:35
阅读次数:
239
单击内置的apk,安装已经内置到系统中的apk
package com.wind.bbminstaller;
import java.io.File;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os....
分类:
其他好文 时间:
2014-07-21 15:25:06
阅读次数:
214
调用拨号程序
// 给移动客服10086拨打电话
Uri uri = Uri.parse("tel:10086");
Intent intent = new Intent(Intent.ACTION_DIAL, uri);
startActivity(intent);
发送短信或彩信
// 给10086发送内容为“Hello”的短信
Uri uri = Uri.par...
分类:
其他好文 时间:
2014-07-21 11:34:44
阅读次数:
285
先看效果
使用
package com.ydl.versionupdate;
import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.view.Menu;
import com.ydl.appupdate.NewVersion;
pub...
分类:
移动开发 时间:
2014-07-21 11:17:25
阅读次数:
242
uitableview 使用 xib 的自定义cell? 新建cell:(假如命名 MyCell) 使用: 向 tableview 注册 nib 全局变量 let cellIdentifier = "myCell" myTableView!.registerNib(UINib(nibName: "MyCell", bundle:nil), f...
分类:
其他好文 时间:
2014-07-21 10:29:38
阅读次数:
748
package com.kale.codeview;import android.os.Bundle;import android.support.v7.app.ActionBarActivity;import android.view.View;import android.view.View.O...
分类:
编程语言 时间:
2014-07-21 00:10:51
阅读次数:
659
代码:
public void funclick(View view){
Intent _intent = new Intent(MainActivity.this,MyService.class);
bindService(_intent, conn, BIND_AUTO_CREATE);
}
private ServiceConnection conn = new Serv...
分类:
其他好文 时间:
2014-07-20 23:11:45
阅读次数:
310
有时候我们需要把A activity提交数据给B activity处理,然后把结果返回给A这种方式在很多种情况需要用到,比如我应用的程序需要有拍照上传的功能。一种解决方案是 我的应用程序〉调用系统相机〉拍照〉关闭系统相机〉返回拍照后的照片到我的应用程序启动一个ForResult的意图:Intent ...
分类:
其他好文 时间:
2014-07-20 22:23:36
阅读次数:
263
你要访问其他的程序,那么这个程序要先装在到模拟器或真机上面,因为我们要使用要访问其他程序的包。
简单的访问有以下两种方式(目前只知道这两种):
一、使用Intent的setComponent方法
Intent intent = new Intent();
intent.setComponent(new ComponentName("包名", "包名.主类名"));
intent....
分类:
其他好文 时间:
2014-07-20 22:15:53
阅读次数:
374
在使用最新版ADT 23进行android学习时发现一些问题:1.通过设置intent的action来启动另外一个activity时,会出现No Activity found to handle Intent这个错误仔细查看了源码发现代码错误,思索许久并未找出错误。当查看到工程的build path...
分类:
移动开发 时间:
2014-07-20 21:29:35
阅读次数:
261