App Widgets are mini apps that give users immediate access to important functions of an app.
We mostly use App Widgets to display important information about an app on a device’s Homescreen.
You can create your own app widgets. We’ll show you how.
Keep up with the fashion: Using Styles and Themes in your apps
Styles specify the look and feel of individual views, like text views and buttons.
Styles help you to:
Themes are simply Styles applied to an app or to individual activities.
Progress bars let the user know that the device is busy, for example, downloading a file. It can also show roughly how much longer the download will take.
Progress bars don’t always look the same on all devices.
We’ll show you how to customise your progress bars so that they look the same on all devices
Android touchscreen devices can sense when the user touches the screen. They can also record the movement of the user’s finger across the screen. These movements or strokes are also known as gestures.
You can store a collection of gestures in a file and then match the user’s gesture with those in the file.
Our tutorial app lets the user write their name on the screen using their finger. We then compare this gesture to our saved gestures and display the result in a text view.
Spinners display a list of selectable items.
When first displayed, the Spinner only shows the currently selected item. Touching the Spinner displays the full list of items that the user can choose from.
Our tutorial will show you how to use a Spinner to display a list of images that the user can choose from.
Our tutorial app creates a table containing text views, text fields and a button.
There is no XML layout file as we do everything programmatically.
A Toast message displays the input after the user has filled in the text fields and pressed the button.
Our tutorial app shows you how to use intents and intent filters in your apps.
Here’s a quick overview of what we’ll cover. We’ll show you how to:
Intents are messages that you can pass around between your app components. You can also send them to components in other apps. This enables you to create powerful applications where you can use other app’s components to perform tasks for you, such as playing music, sending email, and taking pictures.
Here are some of the things that you can do with intents:
The Android System also uses intents to signal changes such as low battery, incoming sms messages and phone calls. You can listen for these intent messages in your apps. You can also use intents to pass data.
You can use alarms to trigger events at any time even if your app is not running.
Device sleeping on the job? Here’s how you can manage the device awake state
You can schedule work to be done. Problem is, nothing will happen if the CPU is sleeping!
The solution is to use a wake lock to prevent the CPU from sleeping while it’s doing your work.
You may also want to keep the screen from turning off. Read on and we’ll show you how…