android开发中经常需要处理各种各样不同的信息,而不同activity中发送和接收信息对于开发也是相当重要的。方法一:发送方代码:Intentintent=newIntent(MainActivity.this,SecondActivity.class);Bundlebundle=newBundle(); bundle.putInt("position",position); intent.putExt..
分类:
其他好文 时间:
2016-08-26 15:49:43
阅读次数:
153
// 主页面 package com.bw.lianxi7;import android.os.Bundle;import android.app.Activity;import android.content.Intent;import android.view.Menu;import andro ...
分类:
其他好文 时间:
2016-08-26 12:22:26
阅读次数:
216
// onCreate中 //找到控件webview web_view = (WebView) findViewById(R.id.web_view); //获得传来的Url Intent intent=getIntent(); share_url = intent.getStringExtra(" ...
分类:
Web程序 时间:
2016-08-26 12:14:04
阅读次数:
172
1、AlarmManager,顾名思义,就是“提醒”,是Android中 常用的一种系统级别的提示服务,在特定的时刻为我们广播一个指定的Intent。简单的说就是我们设定一个时间,然后在该时间到来 时,AlarmManager为我们广播一个我们设定的Intent,通常我们使用 PendingInte ...
分类:
其他好文 时间:
2016-08-26 10:31:54
阅读次数:
146
// 主页面 package com.bw.lianxi7;import android.os.Bundle;import android.app.Activity;import android.content.Intent;import android.view.Menu;import andro ...
分类:
其他好文 时间:
2016-08-25 23:19:58
阅读次数:
333
Intent简介
Android基本的设计理念是鼓励减少组件间的耦合,因此Android提供了Intent (意图) ,Intent提供了一种通用的消息系统,它允许在你的应用程序与其它的应用程序间传递...
分类:
其他好文 时间:
2016-08-25 21:21:25
阅读次数:
210
调用拨号界面拨打电话(不直接打出去) Intent intent1= new Intent(Intent.ACTION_DIAL); intent1.setData(Uri.parse("tel:400-8181800")); startActivity(intent1); Manifest文件里: ...
分类:
移动开发 时间:
2016-08-24 12:33:04
阅读次数:
187
Parcelable 类,接口类,用于数据的序列化封装。常见的Bundle,Intent类都实现了该类。 实现该类需要实现writeToParcel和describeContents方法,最后还需要实现一个静态接口Creator 延伸下:为何需要数据的序列化? 数据的传输和保存时,如果一个对象A引用 ...
分类:
其他好文 时间:
2016-08-24 11:03:45
阅读次数:
119
1.Intent是组件间调用的桥梁。 2.Android系统定义了很多Intent http://developer.android.com/guide/components/intents-common.html 3.Intent Intent包括的内容可以有以下一个或多个 操作 数据 extra ...
分类:
移动开发 时间:
2016-08-23 18:40:55
阅读次数:
196
Android四核心activity,service,broadcast receiver和content provider。除了content provider之外,彼此的通信都要使用Intent对象来进行。 Intent对象描述了要执行的结果是什么,基本内容可以氛围:componentName组 ...
分类:
其他好文 时间:
2016-08-23 16:48:24
阅读次数:
183