找回密码
 立即注册
WidgettheAndroid开发 | android开发 2022-10-29 65 0star收藏 版权: . 保留作者信息 . 禁止商业使用 . 禁止修改作品
Android开发的使用除了程序使用,还有是Widget使用。很多人会开发程序使用而不会开发Widget使用。本帖子就是帮助大家学习如何开发Widget使用的。可要多谢您助威。先简单说说Widget的原理。Widget是在桌面上的一块显示信息的工具,也通过单击Widget跳转到一个程序里面。而系统自带的程序,典型的Widget是music,这个Android内置的音乐播放小程序。这个是典型的Widget+app使用。就是一个程序既可以通过Widget启动,也可以通过App启动。Widget就是一个AppWidgetProvider+一个UI界面显示(预先绑定了很多Intent),界面上的信息可以通过程序控制而改动,单击Widget,上的控件只能激起发送一个Intent,或发布一个Service的启动告诉。而AppWidgetProvider可以拦截这个Intent,而进行相应的管理(比方显示新的信息)。Android开发里要很多的通过手动的方法配置很多xml文件。这关于。net开发来说不得不说是个梦靥呀。这或许也是一般的java程序员比。net程序的薪酬高的一个原因吧。究竟做Java开发,特别是Android开发,的确很累。你可以看下源码对照着源码进行解说。
WidgetApp.apk
WidgetApp.rar

(Android development uses widgets as well as programs. Many people will develop programs to use, but will not develop widgets to use. This post is to help you learn how to develop widgets for use. Thank you for your encouragement. First, let's briefly talk about the principle of Widgets. Widget is a tool to display information on the desktop, and also jump to a program by clicking the widget. The typical widget of the system is music, which is a built-in Android music player. This is a typical use of Widget app. That is, a program can be started through both Widget and App. Widgets are an AppWidgetProvider a UI interface display (many Intents are bound in advance). The information on the interface can be changed through program control. When you click the widget, the controls on the widget can only trigger the sending of an Intent, or publish a service startup notification. The AppWidgetProvider can intercept the Intent and perform corresponding management (such as displaying new information). Android development requires manual configuration of many xml files. This is about. Net development is a nightmare. This is probably the same as the average Java programmer. Net program. It's really tiring to develop Java, especially Android. You can see the source code and explain it against the source code.
WidgetApp.apk
WidgetApp.rar)

[下载]15450019835.rar




上一篇:ArcGIS+API+for+Android+案例教程
下一篇:android SQLite数据库例子