安卓應用部件_設計應用程序小部件的痛苦和喜悅

安卓應用部件

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.pswp.cn/news/274320.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/274320.shtml
英文地址,請注明出處:http://en.pswp.cn/news/274320.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

ASP.NET MVC3中的ViewBag動態性

在MVC 3中的有一個新的ViewBag 動態特性,它主要是為了從Controller到view進行傳值用的,類似有所使用的ViewData[] 字典類。對于ViewBag是如此的強大,意味著你能動態的set/get 值,增加任何數量的的額外字段而不需要強類型的檢測。…

ux設計中的各種地圖_UX設計中的空白

ux設計中的各種地圖UX設計中的空白是什么? (What is white space in UX design?) This article will help you learn about white space and why it so important in UX design.本文將幫助您了解空白以及為什么空白在UX設計中如此重要。 White space is a very us…

花點時間了解消息,句柄和窗口

消息、句柄和窗口 一,為什么我要花時間研究這些東西 對于我個人來說我不想做碼農,不想只知道拖控件,使用控件有的時候要了解一下底層,不知道你們有沒有想過這樣的一個問題,我們在C#中使用的的event事件是怎么觸發這個事…

ux設計中的各種地圖_如何在UX設計中使用顏色

ux設計中的各種地圖Color is the mother tongue of the subconscious.顏色是潛意識的母語。 — Carl Jung—榮格 Color has more to say than meets the eye. As a building block of visual language, color highlights, guides attention, and unifies elements. In UX, co…

《Two Dozen Short Lessons in Haskell》學習(十八) - 交互式鍵盤輸入和屏幕輸出

《Two Dozen Short Lessons in Haskell》(Copyright © 1995, 1996, 1997 by Rex Page,有人翻譯為Haskell二十四學時教程,該書如果不用于贏利,可以任意發布,但需要保留他們的copyright)這本書是學習 Ha…

figma設計_Figma中簡單,可重復使用的設計系統

figma設計Putting together a design system may seem like an unnecessary hassle. It’s often easier to jump straight into designing things without having to worry about styles, components, or libraries. Some might even argue that when it comes to smaller pro…

WPF 關于鼠標事件和坐標

Mouse.GetPosition(window);可以在任何時間獲得相對任意元素的鼠標位置 Mouse.Capture(el);可以讓某個元素獲得所有的鼠標事件不管他應不應該的到鼠標事件 Mouse.Capture(null);解除轉載于:https://www.cnblogs.com/wangjixianyun/archive/2013/03/25/2980953.html

訪問25%無法訪問的人-如何設計可訪問性

We’re increasingly dependent on the internet and computers for everything we do — this has become starkly more obvious through the COVID19 global pandemic.我們所做的一切都越來越依賴于互聯網和計算機-通過COVID19全球大流行,這一點變得更加明顯。 F…

DDD:實體如何處理外部依賴

場景 修改用戶名時,要驗證用戶名的唯一性。 實現1 1 public class User 2 { 3   public void ChangeUsername(string newUsername) 4   { 5   //使用服務定位器獲取IUsernameUniqueService ,執行驗證。 6   } 7 } 實現…

架構師論壇 創業_我在早期創業時作為設計師學到的東西

架構師論壇 創業For over 2 years at a young product company, I collaborated with talented engineering folks for a 0 → 1 suite of products. Here are my learnings and key takeaways. Of course, these are my views and do not represent those of my employers or …

HFileOutputFormat與TotalOrderPartitioner

最近需要為一些數據增加隨機讀的功能,于是采用生成HFile再bulk load進HBase的方式。 運行的時候map很快完成,reduce在sort階段花費時間很長,reducer用的是KeyValueSortReducer而且只有一個,這就形成了單reducer全排序的瓶頸。于是…

qt按鈕禁用和激活禁用_為什么試探法只是經驗法則:禁用按鈕的情況

qt按鈕禁用和激活禁用Most user experience designers will be familiar with Jackob Nielsen’s 10 usability heuristics. They are widely cited and a great set of broad rules of thumb to follow when designing user interfaces.大多數用戶體驗設計師將熟悉Jackob Niel…

Teach Yourself Java 2 in 21 Days 書中樣例代碼實踐

找了好幾書JAVA的書,看了幾章,都看不下去。 我覺得適合《Teach Yourself Java 2 in 21 Days》(Rogers Cadenhead Laura Lemay)還是適合我的。 孫衛琴那本,我感覺就羅嗦多了沒到我點子上。 接口,抽象類這些內…

好奇心機制_好奇心問題

好奇心機制For my past two jobs I’ve posted a question every week in my team chat and learned so much about my co-workers. Give it a try! :D對于過去的兩個工作,我每周都會在團隊聊天中發布一個問題,并且對我的同事了解很多。 試試看&#xff…

20130328java基礎學習筆記-循環結構for以及for,while循環區別

1.循環結構:for講解class ForDemo{ public static void main(String[] args) { /* for(初始化表達式;循環條件表達式;循環后的操作表達式) { 執行語句;(循環體) } */ for(int x 1; x<3; x) { …

小程序設計避免犯什么錯_新設計師犯下的5種印刷錯誤以及如何避免

小程序設計避免犯什么錯Over the last year and a half, I’ve had the opportunity to teach the basics of typography to undergraduate graphic design students. During this time, I’ve noticed some common mistakes that my students make when first learning how to…

移動設備web文字單位_移動設備如何塑造現代Web設計

移動設備web文字單位I was working with a nonprofit earlier this month on redesigning their website and during the first meeting, I proposed a very standard idea: the home page needed to tell a story and guide the intended user through the intended process (…

hp-ux修改時區方法_UX研究人員可以倡導人類的6種方法

hp-ux修改時區方法In the UX world, we often hear terms like “user-centered,” “human-centered,” and “customer-centered.” We believe that in order to be innovative, we need to center experiences that are authentic, intuitive, and practical.在UX世界中&am…

2013年3月百度之星A題

偽隨機數生成器 題目描述 baidu熊最近在學習隨機算法&#xff0c;于是他決定自己做一個隨機數生成器。 這個隨機數生成器通過三個參數c, q, n作為種子, 然后它就可以通過以下方式生成偽隨機數序列&#xff1a; m0 c, mi1 (q2mi 1) mod 2n, for all i > 0. 因為一些奇怪的…

為什么張揚的人別人很討厭_為什么每個人總是討厭重新設計,即使他們很好

為什么張揚的人別人很討厭重點 (Top highlight)微處理 (Microprocessing) In Microprocessing, columnist Angela Lashbrook aims to improve your relationship with technology every week. Microprocessing goes deep on the little things that define your online life to…