From the course: Android App Development: Working with Widgets
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
First widget layout - Android Tutorial
From the course: Android App Development: Working with Widgets
First widget layout
- [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?…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.