Alert Dialog – Part 1

Recently there was a comment on the article Shape Drawables – part 3 asking if is possible to style an AlertDialog, rather than on an Activity, as is covered in that article. The simple answer is yes. However, it is not without it’s problems as we’ll see later.

Custom Controls – Part 3

In the previous article we continued the creation of a custom control and extended it to enable us to configure it via the XML layout rather than only programatically. In this article we’ll cover extending the control further so that we can properly style and theme it.

Custom Controls – Part 2

In the previous article we created a custom control which applies highlights to our text based upon a regular expression. We got this working so that we could control it programatically. In this article we’ll look at how to control things from the XML layout.

Custom Controls – Part 1

In a recent article we looked at how to apply themes to Android apps. In order to further explore how themes work, it is necessary to try to understand precisely how styles and themes are applied to controls. To this end, we will look at building a simple custom control, and then learn how to…

Introduction to Spans

In this article we are going to look at a useful mechanism for applying styles to sections of text. While it is easy enough to style blocks of text using standard Android styles, there is also a mechanism for applying styles to text at a sub-block level. In HTML it is possible to add emphasis…

Themes

If you have read the other articles in this series, then you should be getting quite familiar with applying styles to layouts and widgets, and we can get some pretty good results by combining the techniques that we’ve learned so far. While it is certainly possible to apply a, for example, button style to every…

Simple Animation – Part 3

In the previous articles we have looked at a couple of animation types and the stock interpolators that are available to us. Next we’ll look at the remaining animation types. You can get the source code for the project that we’re working on here. We’ve already encountered translate and alpha animations, and there are a…

Simple Animation – Part 2

In the previous article we got a simple animated transition working. You can get the previous source code here. It is worth pointing out that there are some stock animations available to us but, for some reason, in Android 2.3.3 only four are actually made public so that we can actually use them in our…

Simple Animation – Part 1

In this article we are going to be covering some simple animations in Android. In Honeycomb, Google introduced some new animation functionality, however given the relative scarcity of Honeycomb devices, we’ll focus on the animation tools that are available in earlier version of Android.