ChinaUnix.net
相关文章推荐:

android intent如何传递对象

  【IT168 技术文档】在前面写android的ContentProvider时候,可以看到那是基于观察者 模式的一个消息传递方法。每一个Cursor、ContentResolver做为一个小的注册中心,相关观察者可以在这个中心注册,更新消息由注册中心 分发给各个观察者。而在MFC或Winform中,都会形成一个消息网,让消息在网中流动,被各节点使用、吃掉或者在出口死掉。   相比之下,我个人觉得基于intentandroid核心消息传递机制是有所不同的。它应该会有...

by goandroid - 移动操作系统 - 2008-11-19 16:48:11 阅读(1240) 回复(0)

相关讨论

android中,利用intent对象值 在很多情况下,调用startActivity(intent) 方法,跳转到另外一个Activity或其他component,需要传递一个对象给它。 可以让这个要传递对象类实现Serializable或者Parcelable接口。然后利用onCreate函数中的Bundle参数作为载体,传递这个对象。在新的组建中再获得即可。 例如:[code] @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceSta...

android

by 凝望长空 - 移动操作系统 - 2011-09-01 11:21:56 阅读(1510) 回复(0)

android学习笔记之intent消息传递 Post By:2008-8-30 23:27:00 在 前面写android的ContentProvider时候,可以看到那是基于观察者模式的一个消息传递方法。每一个Cursor、 ContentResolver做为一个小的注册中心,相关观察者可以在这个中心注册,更新消息由注册中心分发给各个观察者。而在MFC或Winform 中,都会形成一个消息网,让消息在网中流动,被各节点使用、吃掉或者在出口死掉。 相比之下,我个人觉得基于intent的An...

by okitamicuki1412 - 移动操作系统 - 2008-11-26 14:12:39 阅读(1115) 回复(0)

intent参数传递 当Activity与Activity/Service 参数传递,常用方法就是通过intent实现 例子: 发送代码:[code] •intent intent = new intent(...); •Bundle bundle = new Bundle(); •bundle.putString("param", "value"); •intent.putExtras(bundle); •context.startActivity(intent); 或 context.startService(intent); [/code]接收代码:[code] •Bundle bunde = intent.getExtr...

安卓

by feiyang10086 - 移动操作系统 - 2011-09-06 16:36:35 阅读(1662) 回复(0)

android之间传递多个对象 androidintent如何传递对象,就我目前所知道的有两种方法,一种是Bundle.putSerializable(Key,Object);另一种是Bundle.putParcelable(Key, Object);当然这些Object是有一定的条件的,前者是实现了Serializable接口,而后者是实现了Parcelable接口,为了让大家更容易理解我还是照常写了一个简单的Demo,大家就一步一步跟我来吧! 第一步:新建一个android工程命名为ObjectTranDemo(类比较多哦!)目录...

androidjava

by 凝望长空 - Java - 2011-11-10 10:17:28 阅读(1427) 回复(0)

androidintent是经常要用到的。 不管是页面牵转,还是传递数据,或是调用外部程序,系统功能都要用到intent

by lsupper - 移动操作系统 - 2011-12-22 08:51:11 阅读(733) 回复(0)

The below code is to get a android Market to open. Am I correct in thinking that this error means that android Market is not installed and there is no other app registered to handle market URLs?


The bug also can be reproduced in emulator

by cdlda - 移动操作系统 - 2011-12-22 08:51:04 阅读(834) 回复(0)

android intent命名规范 ACTION_MAIN android:name="android.intent.action.MAIN" CATEGORY_LAUNCHER android:name="android.intent.category.LAUNCHER" "ACTION_"等价于"android.intent.action." "CATEGORY_"等价于"android.intent.category."

android

by 中关村村草 - 移动操作系统 - 2011-12-23 22:04:57 阅读(1396) 回复(1)

android intent 使用整理 在一个android应用中,主要是由一些组件组成,(Activity,Service,ContentProvider,etc.)在这些组件之间的通讯中,由intent协助完成。 正如网上一些人解析所说,intent负责对应用中一次操作的动作、动作涉及数据、附加数据进行描述,android则根据此intent的描述, 负责找到对应的组件,将 intent传递给调用的组件,并完成组件的调用。intent在这里起着实现调用者与被调用者之间的解耦作用。 intent传...

手机开发

by so_brave - 移动操作系统 - 2011-05-26 13:53:09 阅读(1130) 回复(0)

Normal 0 false false false EN-US ZH-CN X-NONE MicrosoftInternetExplorer4 ...

by yishuihe - 移动操作系统 - 2009-06-02 11:51:40 阅读(1061) 回复(0)

搜集了一些android intent在程序中的常用的用法,汇总起来,希望能够不断总结壮大: 显示网页 1. Uri uri = Uri.parse("http://google.com"); 2. intent it = new intent(intent.ACTION_VIEW, uri); 3. startActivity(it); 显示地图 1. Uri uri = Uri.parse("geo:38.899533,-77.036476"); 2. intent it = new intent(intent.ACTION_VIEW, uri); 3. startActivity(it); 4. //其他 ge...

by yishuihe - 移动操作系统 - 2009-06-01 11:44:14 阅读(984) 回复(0)