Home How to create

postheadericon How to create a GalleryDialogPreference

The standard set of preferences does not provide a Gallery preference. This article describes how you can implement a Gallery preference. We do this by making use of a DialogPreference with a custom layout. The layout is done with xml and we also add some custom xml attributes for more control. A sample application is provided to show the working.

Read more...

 

postheadericon How to create a SeekBarDialogPreference

The standard set of preferences does not provide a SeekBar preference. This article describes how you can implement a SeekBar preference. We do this by making use of a DialogPreference with a custom layout. The layout is done with xml and we also add some custom xml attributes for more control. A sample application is provided to show the working.

Read more...

 

postheadericon How to create a ColorDialogPreference

The standard set of preferences does not provide a Color wheel·preference. This article describes how you can create a color picker preference. We do this by making use of a DialogPreference with a custom layout and the color picker example provided by Android. The layout is done with custom coding. A sample application is provided to show the working.

Read more...

 

postheadericon How to create a Battery Widget

This article will describe the basics on how to develop a simple Battery Widget. A Battery Widget displays the current battery level. To receive battery level changes, you need to register your app for the Intent.ACTION_BATTERY_CHANGED. A sample application is provided to show the working.

Attachments:
Download this file (SampleBatteryWidget1.0.0.zip)SampleBatteryWidget1.0.0.zip12 Kb

Read more...

 

postheadericon How to create a Clock Widget

This article will describe the basics on how to develop a basic digital Clock Widget. A digital Clcok Widget displays the current time. To receive time changes, you need to register your app for the Intent.ACTION_TIME_TICK, Intent.ACTION_TIME_CHANGED (for manual time changes) and Intent.ACTION_TIMEZONE_CHANGED (for timezone changes). A sample application is provided to show the working.

Attachments:
Download this file (SampleClockWidget1.0.0.zip)SampleClockWidget1.0.0.zip11 Kb

Read more...

 

postheadericon How to create and stop a long running background thread

To keep the user interface response during a long running process, two possible implementations are commonly used. You can either use a Service or a background thread. This article describes the usage of a background thread including what to do to stop the background thread. A sample application is provided to show the working.

Attachments:
Download this file (SampleLongProcessing.zip)SampleLongProcessing.zip16 Kb

Read more...

 

postheadericon How to create a Live Wallpaper

One of the new Android 2.1 features was the Live Wallpaper. This article describes the basis and provides a sample Live Wallpaper.

Attachments:
Download this file (SampleLiveWallpaper.zip)SampleLiveWallpaper.zip13 Kb

Read more...

 

postheadericon How to create onDoubleTap for Google Maps

If you are using the Google Maps within your app, you would like to have as much functionality as Google Maps it self offers. This is unfortunately not the case. You have to implement some stuff yourself. The double click/tap is one of these features which you have to implement yourself.

Attachments:
Download this file (ZoomSampleGoogleMap.zip)ZoomSampleGoogleMap.zip17 Kb

Read more...

 

postheadericon How to create an image on a Toast

The Toast class is used to display a simple and not to big notifications to the user. The default layout is only capable of displaying text. This article will describe how you can alter the default layout into a layout with an image. The end result will be a Toast looking like this:

toast

Read more...

 

postheadericon How to create an ImageListPreference

The standard android ListPreference does not provide an easy way to display an image for each item if the list. This article describes how you can implement this. The aim is to add the images the same way as the text values are added.

Attachments:
Download this file (SampleImageListPreference.zip)SampleImageListPreference.zip27 Kb

Read more...