Archive for the ‘LinearLayout’ Category
Android Layouts are extremely powerful. In the article on Supporting Multiple Displays we looked at how we can use Layouts to allow Android to take a certain amount of responsibility for fitting things to the display. However, Android supports a number of different types of Layout and, while we may have a clear idea of how things should be arranged on the screen, it is not always obvious which type of layout(s) we should use to achieve this. In this series of articles, we will examine the different types of layout available to us, to help us to get a feel for which layout type we should use to solve different problems.
There is an often overlooked feature of layouts which is extremely powerful and allows us to get some pretty fine-grained control of the humble LinearLayout: Layout weights. We have briefly touched on layout weights in the Intelligent Layouts article, but we’ll cover them in a little more depth here.
I recently read an article bemoaning the fact that Android apps look inferior to their iPhone counterparts even when both apps are produced by the same company. You can read the original article here. While I don’t necessarily agree with some of the points raised, the purpose of this blog is to help improve the look and feel of Android apps, so let’s look at a specific example, and try to improve upon it.