Android Widget开发指导-翻译 Android开发技术

   Widget是Android 1.5的一个新特性,允许程序显示一些常用而又重要的信息在用户的Home screen(桌面主屏)上,标准的Android系统映像包含了一些示例widgets包括指针时钟、音乐播放器和其他工具如Google搜索栏。(Widgets are a feature introduced in Android 1.5. A widget displays an application’s most important or timely information at a glance, on a user’s Home screen. The standard Android system image includes several examples of widgets, including widgets for Analog Clock, Music, and other applications.)

  正文Android开发网不做过多的赘述和翻译,仅仅作一些提示,相信结合图片网友可以很好的理解掌握,毕竟Widget和标准的Apps相比没有太大的区别,更多的是在UI上的处理,逻辑执行还是设计成服务更稳定和更高的可靠性。

 

 

标准Widget剖析(Standard widget anatomy)

  典型的Android Widget有三个主要组件,一个边框、一个框架和图形控件以及其他元素。(Typical Android widgets have three main components: A bounding box, a frame, and the widget’s graphical controls and other elements. Well-designed widgets leave some padding between the edges of the bounding box and the frame, and between the inner edges of the frame and the widget’s controls. Widgets designed to fit visually with other widgets on the Home screen take cues from the other elements on the Home screen for alignment; they also use standard shading effects. All of these details are described in this document. )

竖屏方向 (Standard Widget Sizes in Portrait Orientation)

横屏方向 (Standard Widget Sizes in Landscape Orientation)

 目前Android平台的分辨率主要是320×480我们把整个Home Screen分为4X4的区域,比如下面的4X1 (320X100) 或者3X3 (240X300) 以及2X2 (160X200)

 

同样的横屏下也分为4X4,其中4 x 1 (424 x 74) 、3X3 (318 x 222) 以及 2 x 2  (212 x 148)

有关Widget Frame的设计可以参考如下: 

  标准Widget阴影

  我们使用Aodbe Photoshop的图层选项来添加阴影,

  最终设计好的如下,保存为PNG格式的图片即可可以很好的保留Alpha透明通道,相对于GIF格式来说拥有更高的画质,因为GIF格式仅有256种颜色。

本人擅长Ai、Fw、Fl、Br、Ae、Pr、Id、Ps等软件的安装与卸载,精通CSS、JavaScript、PHP、ASP、C、C++、C#、Java、Ruby、Perl、Lisp、Python、Objective-C、ActionScript、Pascal等单词的拼写,熟悉Windows、Linux、OS X、Android、iOS、WP8等系统的开关机。

通过下面的方式来联系我们:

电邮:138762189@qq.com

联系QQ:点击这里给我发消息

官方站:www.tadke.com

※ ※ 联系请加我的企鹅号 ※※

※ ※技术支持请微信联系站长 ※※

Copyright © 2023 Tadke.com. 琼ICP备20000547号