山岭巨人

  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 :: 管理 ::

随笔分类 -  Android Widget

摘要:在appWidget中,ImageButton和Button都是被支持的控件,其事件可分成三种类型:一、开启Activity二、开始Service三、发送按钮Action下面开始一个一个分析,如何实现。一、开启Activity1、首先先定义个开启Activity的intenteg:Intent fullIntent=new Intent(this ,FullScreen.class);若要传递数据,则使用intent.putExtra()方法eg:fullIntent.putExtra("isCircle", isCircle);2、用intent实例化一个PendingI 阅读全文
posted @ 2011-04-22 13:16 山岭巨人 阅读(6384) 评论(1) 推荐(2)

摘要:1.RemoteView概述到目前为止,我发现RemoteView会用在两个地方:一个是在AppWidget,另外一个是在Notification.先从官方对他的定义来看:RemoteView--A class that describes a view hierarchy that can be displayed in another process. The hierarchy is inflated from a layout resource file, and this class provides some basic operations for modifying the c 阅读全文
posted @ 2011-04-22 12:42 山岭巨人 阅读(24943) 评论(7) 推荐(1)

摘要:Widget是Android1.5版所引进的特性之一.Widget,可让用户在主屏幕界面及时了解程序显示的重要信息.标准的Android系统已包含几个Widget的示例,如模拟时钟,音乐播放器等.1、AppWidget 框架类1、AppWidgetProvider :继承自 BroadcastRecevier , 在AppWidget 应用 update、enable、disable 和 delete 时接收通知。其中,onUpdate、onReceive 是最常用到的方法,它们接收更新通知。2、AppWidgetProvderInfo:描述 AppWidget 的大小、更新频率和初始界面等信 阅读全文
posted @ 2011-04-12 11:16 山岭巨人 阅读(10441) 评论(2) 推荐(1)