In this video, Emmanuel Henri explores the widget design template to provide a solid ground to get started with.
- [Instructor] Now that you have a good understanding … of the design guidelines, … let's look at some templates in more details … into the widget specs that Android provides. … So go to this link … and once you get to this page, … if you scroll down to Widget Anatomy right here … you're going to see a bit more details … around the anatomy of a widget. … Basically, when you look into this graphic … you have three elements, … a binding box, the widget margin, and the padding. … When you build your widget, … you want to make sure you have enough space … in between each section to leave breathing room … for your elements of your widget. … Next, you need to determine the minimum height … and widget are your widget. … And as you scroll down to the table, … you'll see an approximate number of DPs … your widget must be based on the number of cells high … or wide you want your widget to be. … To give you an idea of what that means, … look further down into the music player example. … So if we calculate the minimum width …
- Design guidelines for Android widgets
- Creating the widget layout
- Working with the AppWidgetProvider class
- Adding functionality with provider functions
- Pinning app widgets