Material design - Components– Widgets

Widgets - 窗口小部件

Widgets display glanceable views of an app's most important data and functionality.

【翻译】
小部件显示应用程序最重要的数据和功能的可见视图。

Usage - 用法

Home screen widgets display your app’s new and interesting content in a consolidated form. They link to richer detail within the app.

Users can move and, if supported, resize widgets across their home screen panels.

【翻译】
主屏幕小部件以合并的形式显示您应用的新内容和有趣的内容。他们链接到更丰富的细节在应用程序内。
用户可以移动,如果支持,可以在其主屏幕面板上调整小部件的大小。

Types of widgets - 窗口小部件的类型

Information widgets - 信息小部件

Information widgets display a few elements of importance to a user and track how that information changes over time, such as weather or sports scores. Tapping the widget launches the associated app into a detail view.

【翻译】
信息小部件向用户显示一些重要的元素,并跟踪该信息随时间的变化,例如天气或运动成绩。点击小部件将相关联的应用程序启动到详细视图。

image

An information widget

【翻译】
信息小部件

Collection widgets - 集合小部件

Collection widgets display multiple elements of the same type, such as a collection of articles from a news app. They focus on two interactions:

Browsing a collection
Opening an element’s detail view
Collection widgets can scroll vertically.

【翻译】
集合小部件显示同一类型的多个元素,例如来自新闻应用程序的文章集合。 他们专注于两个互动:
浏览集合
打开元素的详细视图
集合小部件可以垂直滚动。

image

Collection widgets

【翻译】
集合小部件

Control widgets - 控件小部件

Control widgets display frequently used functions. These functions may be triggered from the home screen without opening the app. For example, music app widgets allow the user to play, pause, or skip music tracks from outside the music app.

Control widgets may or may not progress to a detail view.

【翻译】
控件窗口小部件显示常用功能。 这些功能可以从主屏幕触发而不打开应用程序。 例如,音乐应用程序小部件允许用户从音乐应用程序外部播放,暂停或跳过音乐曲目。
控件窗口小部件可能或可能不会进入详细视图。

[图片上传失败...(image-9a026a-1552292469493)]
A control widget

【翻译】
控件窗口小部件

Hybrid widgets - 混合小部件

Many widgets are hybrids that combine elements of the different types above. Center your widget around one of these types and add elements of others as needed.

For example, a music player widget combines a control widget with elements of an information widget. The result keeps the user informed about which track is currently playing.

【翻译】
许多小部件是混合以上不同类型的元素。 将您的窗口小部件放置在其中一种类型之间,并根据需要添加其他元素。
例如,音乐播放器窗口小部件将控制窗口小部件与信息小窗口的元件组合。 结果保持用户知道当前正在播放哪个音轨。

image

A hybrid widget

【翻译】
混合小部件

Behavior - 行为

**Navigation - 导航 **

Your widgets should provide navigation links to frequently used areas of your app, including:

Functions that allow the user to create new content, such as a new document or message
Access to the top level of your app

【翻译】
您的小部件应提供指向应用常用区域的导航链接,其中包括:
允许用户创建新内容的功能,例如新文档或消息
访问应用的顶级

Widget resizing - 小部件调整大小

Resizing allows users to adjust the height or width of a widget. This allows users to influence the layout of widgets on home panels.

Your app may be completely resizable or constrained to horizontal or vertical size changes.

【翻译】
调整大小允许用户调整窗口小部件的高度或宽度。这允许用户影响家用面板上的小部件的布局。
您的应用程式可能完全可调整大小,或限制为横向或纵向大小变更。

image

A long press and subsequent release sets resizable widgets into resize mode. Users can use the drag handles or the widget corners to set the desired size.

【翻译】
长按和后续发布将可调整大小的小部件设置为调整大小模式。用户可以使用拖动手柄或小部件角来设置所需的大小。

Scrollable widgets - 可滚动小部件

List or grid-based collection widgets usually expand or contract the vertical scrolling area. Regardless of the widget's size, the user can still scroll all elements into view.

Determine how much of your app's information should surface. For smaller sizes concentrate on the essential and then add more contextual information as the widget grows.

【翻译】
列表或基于网格的集合小部件通常会展开或收缩垂直滚动区域。无论小部件的大小,用户仍然可以滚动所有元素到视图。
确定应用程序的信息应显示多少。对于较小的大小集中在必要的,然后添加更多的上下文信息作为小部件增长。

Non-scrollable widgets - 不可滚动小部件

Information widgets are not scrollable. All content and layout must dynamically fit as sized by the user.

【翻译】
信息小部件不可滚动。所有内容和布局必须动态适合用户的大小。

Responsive resizing - 响应调整大小

Widgets should accommodate different spacing requirements across devices, including cell number, size, and spacing variations.

【翻译】
窗口小部件应适应不同设备的不同间距要求,包括单元格编号,大小和间距变化。

Configuring widgets - 配置小部件

Android widgets display their configuration choices once placed on a home panel.

【翻译】
Android小部件在放置在主面板上时会显示其配置选项。

Configuration best practices:

Keep configuration light and don't present more than 2-3 configuration elements
Present configuration choices using dialogs, rather than full-screen, to retain the user's context
Once setup, widgets do not typically show a "Setup" or "Configuration" button.

【翻译】
配置最佳实践:
保持配置光,并且不超过2-3个配置元素
当前的配置选择使用对话框,而不是全屏,保留用户的上下文
一旦设置,小部件通常不会显示“设置”或“配置”按钮。

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 219,753评论 6 508
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 93,668评论 3 396
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 166,090评论 0 356
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 59,010评论 1 295
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,054评论 6 395
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,806评论 1 308
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,484评论 3 420
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,380评论 0 276
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,873评论 1 319
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,021评论 3 338
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,158评论 1 352
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,838评论 5 346
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,499评论 3 331
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,044评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,159评论 1 272
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 48,449评论 3 374
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,136评论 2 356

推荐阅读更多精彩内容