安卓应用部件

Some people say widgets are a thing of the past, but recently we faced a market for which this was one of the main features users were asking for. A bit of googling showed there are not a lot of useful articles covering widget design (most information is found in human interface guidelines and material design), though development is more widely covered.

有人说小部件已成为过去,但是最近我们面对的市场是用户要求的主要功能之一。 有点谷歌搜索表明,尽管开发涉及的范围更广,但没有很多有用的文章涵盖小部件设计(大多数信息可在人机界面指南和材料设计中找到)。

Because of that, this article will cover how to design a widget for both platforms. Let’s start with the basics, although I’m sure most of you know what a widget is. :)

因此,本文将介绍如何为两个平台设计小部件。 让我们从基础开始,尽管我敢肯定你们大多数人都知道小部件是什么。 :)

什么是小部件? (What are widgets?)

Widgets are mini application views that are embedded on the home or lock screen of smartphones. They allow users to interact with an app without opening the app itself. They usually receive periodic updates and are very useful for displaying small amounts of data or app-specific functionality information that’s important right now. For example, our widget is for a telecom and displays tariff name, current balance, remaining data…

小部件是嵌入在智能手机主屏幕或锁定屏幕上的微型应用程序视图。 它们允许用户与应用交互,而无需打开应用本身。 它们通常会定期更新,对于显示少量数据或特定于应用程序的功能信息非常有用,这些信息现在很重要。 例如,我们的窗口小部件用于电信,并显示费率名称,当前余额,剩余数据…

小部件设计 (Widget design)

When we get to the topic of designing widgets, a lot of questions open up. Especially since we have two different platforms to design for, different screen sizes and options users want to have. Some users want to see just the basic info, for example, the amount left on their account, whereas others want to see more details, but the thing that connects them is that both want to see the information instantly. Another problem is that there is no strict definition of sizes or detailed info on how to design the widget. For most of us (designers) that is frustrating, since we want to create a mockup which will show how the widget is really going to look like before developing it.

当我们谈到设计小部件的主题时,就会出现很多问题。 特别是由于我们要设计两个不同的平台,因此用户希望拥有不同的屏幕尺寸和选项。 有些用户只想查看基本信息,例如,帐户上剩余的金额,而有些用户想查看更多的详细信息,但联系他们的是他们俩都希望即时查看信息。 另一个问题是,没有大小的严格定义或有关如何设计小部件的详细信息。 对于我们大多数人(设计人员)来说,这令人沮丧,因为我们要创建一个模型,该模型将显示小部件在开发之前的外观。

The first step in designing the widget is to define what information your widget is going to show. It would be good to do some research and define which information your users would like to see.

设计窗口小部件的第一步是定义窗口小部件将显示的信息。 进行一些研究并定义您的用户希望查看哪些信息将是很好的。

Widgets can contain text, icons, buttons, images and more. They don’t contain input fields, checkboxes or radio buttons.

小部件可以包含文本,图标,按钮,图像等。 它们不包含输入字段,复选框或单选按钮。

Image for post

iOS小工具 (iOS widget)

iOS widgets are a little bit easier to design, since there is a lot predefined. Usually there is only one widget per application and one configuration screen.

由于有许多预定义的功能,所以iOS小部件的设计要容易一些。 通常,每个应用程序只有一个小部件和一个配置屏幕。

When you first start thinking about the iOS widget, go through the human interface guidelines on that topic: https://apple.co/3d9xVQI

当您第一次开始考虑iOS小部件时,请遵循有关该主题的人机界面指南: https : //apple.co/3d9xVQI

There is a lot of info to be taken from them, these are the main points to keep in mind when designing the widget:

从中可以获取很多信息,这些是设计小部件时要牢记的要点:

  • the width of a widget varies, depending on the device and orientation
    小部件的宽度会有所不同,具体取决于设备和方向
  • there are two states: collapsed or expanded — keep in mind that not all widgets support expansion. On iOS 13 the “show more” and “show less” are replaced with just an arrow down / up
    有两种状态:折叠或展开-请记住,并非所有小部件都支持展开。 在iOS 13上,“显示更多”和“显示更少”仅用向下/向上箭头替换
  • a collapsed widget is the height of roughly two and a half table rows — taking into consideration that one row is 44px we have a height of 110px for a collapsed widget. It shows essential information that can stand alone

    折叠小部件的高度大约为两行半表格-考虑到一行为44px,折叠小部件的高度为110px。 它显示了可以独立存在的基本信息

  • an expanded widget is ideally no taller than the height of the screen. It shows additional information.
    扩展小部件的高度最好不超过屏幕的高度。 它显示其他信息。
  • use system font San Francisco (SF) in black or dark grey
    使用黑色或深灰色的系统字体旧金山(SF)
  • avoid customizing background and never use a photo as a background
    避免自定义背景,并且永远不要将照片用作背景
  • avoid extending content to the edges of a widget, use the app icon at the top of your widget for alignment guidance. Provide a margin of at least a few pixels between each edge and the content
    为避免将内容扩展到窗口小部件的边缘,请使用窗口小部件顶部的应用程序图标进行对齐指导。 在每个边缘和内容之间提供至少几个像素的边距
  • let people tap the content itself to see or edit it in your app. Never use your widget to open other apps
    人们可以点击内容本身以在您的应用中查看或编辑它。 切勿使用小部件打开其他应用
  • if your widget provides additional functionality when someone is logged into your app, make sure people know about this. For example, an app that shows your mobile subscription info will have a message like this: “Sign into the app to view your account status.” when you aren’t logged in.
    如果当某人登录到您的应用程序时您的窗口小部件提供了其他功能,请确保人们对此有所了解。 例如,显示您的移动订阅信息的应用程序将显示以下消息:“登录到该应用程序以查看您的帐户状态。” 未登录时。

Mocking up a widget on iOS

在iOS上模拟小部件

You can create a mockup of your widget in order to define the design or get the client’s approval.

您可以创建窗口小部件的模型,以定义设计或获得客户的认可。

Here is a list of elements you need to think about in order to create a high fidelity mockup:

这是创建高保真模型时需要考虑的元素列表:

  1. collapsed height - 110px including the header
    折叠高度-110px(包括标题)
  2. header height - 36px
    标头高度-36像素
  3. rounded corners - 13
    圆角-13
  4. app icon size - 20x20px
    应用程式图示大小-20x20px
  5. use system font San Francisco (SF) in black or dark grey
    使用黑色或深灰色的系统字体旧金山(SF)
  6. app name - 13pt, regular, uppercase
    应用名称-13pt,常规,大写
  7. show more/less - 13pt, regular (or just arrows on iOS 13)
    显示更多/更少-13pt,常规(或仅在iOS 13上为箭头)
  8. margins and padding
    边距和填充

Interesting bug

有趣的错误

Although the widget normally works without unlocking the phone, we encountered an interesting bug while developing our iOS widget. Our application uses a token to access the data it needs and so does the widget, but this token is stored in the iPhone’s secure storage. While the screen was locked, the widget couldn’t access it and would display an error message, despite everything appearing to be OK. We solved this problem by using a simple message “please unlock your phone” in case the phone was locked and after that the widget would work OK.

尽管该小部件通常可以在不解锁手机的情况下正常工作,但是在开发iOS小部件时我们遇到了一个有趣的错误。 我们的应用程序使用令牌访问其所需的数据,小部件也是如此,但是此令牌存储在iPhone的安全存储中。 屏幕锁定后,小部件无法访问它,并且会显示一条错误消息,尽管看起来一切正常。 我们通过使用一条简单的消息“请解锁您的手机”来解决此问题,以防手机被锁定,然后小部件可以正常工作。

Example

Image for post
A mockup of the iOS widget
iOS小部件的模型

Android小部件 (Android widget)

On Android, users can have multiple widgets with different settings / content. Android widget is extremely flexible (although there is a limit on the number of views and layouts you can use to display the widget). While designing, you can use different colors, images, icons, buttons, text, size…

在Android上,用户可以具有具有不同设置/内容的多个小部件。 Android小部件非常灵活(尽管可用于显示小部件的视图和布局数量有限)。 在设计时,您可以使用不同的颜色,图像,图标,按钮,文本,大小...

Since they can be of different sizes, your developers will play an important role here. Together you can define how the widget will look like and try and define all the possible sizes for your widget according to the content you want to display to your users.

由于它们的大小可能不同,因此您的开发人员将在这里扮演重要角色。 您可以一起定义窗口小部件的外观,并根据要显示给用户的内容尝试定义窗口小部件的所有可能尺寸。

When you first start thinking about the Android widget, go through the material guidelines on that topic: https://bit.ly/3d9FvLf

当您第一次开始考虑Android小部件时,请仔细阅读有关该主题的材料指南: https : //bit.ly/3d9FvLf

These are the main points to keep in mind when designing the widget for android:

这些是为Android设计小部件时要记住的要点:

  • the height or width of a widget can be adjusted and you can define how many cells on the home screen it will take up
    窗口小部件的高度或宽度可以调整,您可以定义在主屏幕上它将占用多少个单元格
  • default home screen positions widgets in its window, based on a grid of cells that have a defined height and width. These cells are roughly 40dp. The term “roughly” is used because different devices can have different cell sizes and layouts.
    默认主屏幕在窗口中基于具有定义的高度和宽度的单元格在窗口中放置小部件。 这些单元大约为40dp。 使用术语“大约”是因为不同的设备可能具有不同的单元大小和布局。
  • you can set up a minimum number of cells, but can’t define the maximum number
    您可以设置最小数量的单元格,但不能定义最大数量
  • if the design doesn’t take up an entire cell, android will align it within the specified cells.

    如果设计未占用整个单元格,则android会将其在指定单元格内对齐。

    The user will still be able to tap the whole cell, even if the design doesn’t cover it whole

    即使设计不能完全覆盖整个单元,用户仍然可以点击整个单元

  • widgets should not generally extend to screen edges and as of Android 4.0, widgets are automatically given margins between the widget frame and the app widget’s bounding box to provide better alignment with other widgets and icons on the user’s home screen
    小部件通常不应扩展到屏幕边缘,从Android 4.0开始,小部件会自动在小部件框架和应用小部件的边界框之间指定边距,以便与用户主屏幕上的其他小部件和图标更好地对齐
  • preview image — field — specifies a preview of what the app widget looks like. This preview is shown to the user from the widget picker. If this field is not supplied, the app widget’s icon is used for the preview.

    预览图像-字段 -指定应用程序小部件外观的预览。 该预览是从窗口小部件选择器显示给用户的。 如果未提供此字段,则使用应用程序小部件的图标进行预览。

Mocking up a widget on Android

在Android上模拟小部件

You can also create a mockup of your widget on Android in order to define the design or get the client’s approval.

您也可以在Android上创建小部件的模型,以定义设计或获得客户的认可。

Here is a list of elements you need to think about in order to create a high fidelity mockup.

这是创建高保真模型时需要考虑的元素列表。

  1. different sizes of the widget - chosen in accordance with the data you want to show to your users - consult your developers when picking the sizes you want to use
    小部件的不同大小-根据要显示给用户的数据进行选择-选择要使用的大小时请咨询开发人员
  2. you can use any color you want
    你可以使用任何你想要的颜色
  3. margins and padding
    边距和填充
  4. create a preview image
    创建预览图像

Example

Image for post
A mockup of the Android widget
Android小部件的模型

结论 (Conclusion)

I hope these tips helped you understand how to create a high fidelity mockup of your widget which you can then share with your teammates or successfully present to a client. If you are looking for something easier, one option would be to create a screenshot of an existing widget and use it to create your mockup. Another option is to create a preview with the developers. The problem with this last option is that in case the client wants to change a lot, the developers have to work on it again and you spend more time on thing which you might not be able to charge.

我希望这些技巧可以帮助您了解如何创建小部件的高保真模型,然后与您的队友共享或成功地将其呈现给客户。 如果您正在寻找更简单的方法,一种选择是创建现有窗口小部件的屏幕截图并使用它来创建您的模型。 另一个选择是与开发人员一起创建预览。 最后一个选项的问题在于,如果客户想要进行很多更改,则开发人员必须再次进行处理,并且您会花更多的时间处理您可能无法支付的费用。

In either case, my suggestion is: consult your developers before you start working on a widget, together you will be able to create a perfect solution.

无论哪种情况,我的建议是:在开始使用窗口小部件之前,请咨询您的开发人员,您将可以共同创建一个完美的解决方案。

A big thanks to our developers Jeton Fejza and Marko Iličić for reviewing this post. :)

非常感谢我们的开发人员Jeton Fejza和MarkoIličić审阅了这篇文章。 :)

翻译自: https://blog.undabot.com/the-pain-and-joy-of-designing-app-widgets-3b6ef188cfd3

安卓应用部件

http://www.taodudu.cc/news/show-893882.html

相关文章:

  • ux设计中的各种地图_UX设计中的空白
  • ux设计中的各种地图_如何在UX设计中使用颜色
  • figma设计_Figma中简单,可重复使用的设计系统
  • 访问25%无法访问的人-如何设计可访问性
  • 架构师论坛 创业_我在早期创业时作为设计师学到的东西
  • qt按钮禁用和激活禁用_为什么试探法只是经验法则:禁用按钮的情况
  • 好奇心机制_好奇心问题
  • 小程序设计避免犯什么错_新设计师犯下的5种印刷错误以及如何避免
  • 移动设备web文字单位_移动设备如何塑造现代Web设计
  • hp-ux修改时区方法_UX研究人员可以倡导人类的6种方法
  • 为什么张扬的人别人很讨厌_为什么每个人总是讨厌重新设计,即使他们很好
  • 学习ui设计_如果您想学习UI设计,该怎么办
  • css 字体字体图标_CSS基础知识:了解字体
  • mysql下载哪一代版本好_潮一代更好的设计
  • 预约清单ui设计_持续交付质量设计所需的UI清单
  • 静态创意和动态创意_我在22岁时学到的关于创意指导的知识
  • 绝对编码和增量编码_用户体验设计师应该学习编码吗? 绝对
  • 完美主义怎么解决_相信我,你不要完美主义
  • 为什么ui框架设计成单线程_评估UI设计的备忘单
  • css 菜单栏悬停_在CSS中构建悬停菜单
  • 一级学科和二级学科_在多学科团队中工作的6个障碍(以及如何解决这些问题)
  • lynda ux_如何建立内部UX团队
  • 财务软件开发_财务独立对软件开发人员的重要性
  • book电子书数据库设计_如何为杀手book的封面设计写出完美的摘要
  • 5g的负面影响_设计系统的实施是否会对早期概念产生负面影响?
  • 像素/厘米与像素/英寸区别_像素/体素艺术入门指南
  • 本土链雷达网_走向本土设计
  • pyqt5子窗口跳出主窗口_弹出式窗口与 可用性,转换和跳出率
  • 移动硬盘不可用_如何对您的网站执行移动可用性审核
  • 开发人员安全行为规则_为开发人员改善生活的7条简单规则

安卓应用部件_设计应用程序小部件的痛苦和喜悦相关推荐

  1. android小部件的作用,Android 应用小部件的实现

    有些时候,我们需要为自己的应用添加一个桌面小部件来显示一些简单但是关键的信息方便用户使用.应用小部件的视图是靠RemoteViews来展现的,而RemoteViews内只能放置一些简单的ViewGro ...

  2. 桌面时钟代码_被遗忘的手机桌面小部件

    iOS 和 Android,两个移动时代的操作系统在历经十多年发展后,成熟度之高已经很难再找出大的短板. 如今,这两个系统相似的部分,大概比它们不相似的地方还要多得多.从早期的下拉通知栏,再到现在的侧 ...

  3. mysql一百转化为五分制_设计一个程序,将从键盘上输入的百分制成绩转换成对应的五分制成绩并输出。90分以上为A,80~90分为B,...

    设计一个程序,将从键盘上输入的百分制成绩转换成对应的五分制成绩并输出.90分以上为A,80~90分为B,以下文字资料是由(历史新知网www.lishixinzhi.com)小编为大家搜集整理后发布的内 ...

  4. python定义一个triangle类_设计一个程序,程序中有三个类,Triangle,Lader,Circle。...

    //此程序写出三个类,triangle,lader,circle:其中triangle类具有类型为double的a,b,c边以及周长,面积属性, //具有周长,面积以及修改三边的功能,还有判断能否构成 ...

  5. python tkinter画布设置按钮对图片放大缩小_使用Tkinter画布小部件添加放大和缩小?...

    小编典典 据我所知,内置的Tkinter Canvas类缩放不会自动缩放图像.如果无法使用自定义窗口小部件,则可以缩放原始图像,并在调用缩放功能时将其替换在画布上. 下面的代码片段可以合并到您的原始类 ...

  6. Android-自定义桌面小部件【完成小米MIUI小部件】

    最近相信大家都坐着小板凳听了MIUI的内容吧.当然了MIUI小部件可以说让MIUI上档次了许多,作为开发者的你是否为之惊叹?当然了我看到了许多的貌似自定义的简单操作,当然了大多数都是可爱简约的背景加动 ...

  7. arm ida 伪代码 安卓 符号表_每天一个IDA小技巧(一): 序言

    前言 Native逆向大概是每个逆向人都敬畏又心存挑战的存在,但是又不知道从何下手,得益于汇编的繁琐,简单的高级语言在反编译成汇编指令之后分析起来复杂膨胀了无数倍,再加上对IDA Pro的一无所知,反 ...

  8. python成绩转换、百分制到五分制_设计一个程序,将从键盘上输入的百分制成绩转换成对应的五分制成绩并输出。90分以上为A,80~90分为B,...

    展开全部 编码思路:申明两个变量: 成绩cj为 浮点数float 且  取值范围为 [0,100] 闭区间内; pf为字62616964757a686964616fe58685e5aeb9313334 ...

  9. python粘性拓展_如何将tkinter小部件置于粘性框架中

    在google中使用"如何使tkinter网格扩展",我遇到了这个问题. 引用布莱恩·奥克利的话Rows and columns have "weight" w ...

最新文章

  1. 在Windows系统中安装WAMP
  2. java assetmanager_AssetManager asset的使用
  3. Similar Pairs CodeForces - 1360C(图匹配+简单贪心)
  4. 一个项目三个坑,我懵了
  5. QT每日一练day24:绘画事件
  6. VS2008源代码管理软件组合-visualSVN Server+TortoiseSVN+AnkhSvn
  7. (转)Membership、MembershipUser和Roles类 详解
  8. java获取时间日期代码
  9. web播放器-jwplayer
  10. 混淆矩阵评价指标_机器学习模型评价指标 -- 混淆矩阵
  11. 手机直播app制作大揭秘之视频直播系统方案
  12. github android官方客户端,github安卓手机版APK下载-github Android客户端下载v2.0 官方版-腾牛安卓网...
  13. Markdown编辑器如何配置图片大小
  14. Pytorch 风格迁移(Style transfer)
  15. log4j2:占位符引起的内存泄漏bug
  16. 情境领导者-第二章、领导风格
  17. t420i升级固态硬盘提升_电脑升级固态硬盘,速度还不够快?这些设置你一定没做好...
  18. 前端React 框架- UmiJS有听说过吗?
  19. 小皮php的简单使用
  20. 深入理解Linux内核之主调度器(下)

热门文章

  1. python数据处理常用函数_pandas数据分析常用函数总结大全:上篇
  2. python的字符串定界符可以使用_使用Template格式化Python字符串的方法
  3. c++ 字符串赋给另一个_7.2 C++字符串处理函数
  4. Android之PhotoView使用(原创)
  5. tomcat源码 Connector
  6. ansible for devops读书笔记第一章
  7. SpringMVC(十七-二十) ModelAttribute 注解
  8. BZOJ_1798__Codevs_2216_[AHOI_2009]_行星序列_(线段树)
  9. Myeclipse 安装Aptana3.2 插件
  10. 跨域(三)——JSONP