In this video, Emmanuel Henri introduces what the layout class is and its purpose in your widget development.
- [Instructor] In this chapter, we'll start developing … our own widget based off the sample application. … But before we get started, know that the only layout classes … you have access to for a widget are FrameLayout, … LinearLayout, RelativeLayout, and GridLayout. … If you're not 100% familiar with these, … look for their details on Android's documentation. … So let's get started with our first widget … and create one with the wizard. … So here we have our main design area. … So let's close that and this is our main app here. … So let's create the actual widget. … So right-click on App, then select New, … scroll down to Widget, and then App Widget. … And what we're going to do, … we're going to call this one TestWidget. … And in fact let's remove Widget … because it's going to be confusing if we have extensions … that says Widget as well. … So let's just keep it as Test. … And for the placement, Home-screen only. … So we're going to keep that simple for now so Home-screen only. … Can we resize it horizontally and vertically? …
- Design guidelines for Android widgets
- Creating the widget layout
- Working with the AppWidgetProvider class
- Adding functionality with provider functions
- Pinning app widgets