官术网_书友最值得收藏!

Exploring Android UI design

We will see with Android UI design that so much of what we learn is context sensitive. The way that a given widget's x property will influence its appearance might depend on a widget's y property. It probably isn't possible to learn this verbatim. It is most likely best to expect to gradually get better and faster results with practice.

For example, if you play with the designer by dragging and dropping widgets onto the design, the XML code that is generated will vary quite extensively depending upon which layout type you are using. This is because different layout types use different means to determine the position of their children. We will see this, perhaps most distinctly, when we look at RelativeLayout later in the chapter.

This information might initially seem like a problem, or a bad idea, and it certainly is a little awkward at first. What we will grow to learn, however, is that this apparent abundance of layout options and their individual quirks are actually a good thing because they give us almost unlimited design potential. There are very few layouts you can imagine that are not possible to achieve.

This unlimited potential comes with a bit of complexity however. So, rather than a few step-by-step examples that lack explanation, I thought a three-pronged approach would be worthwhile. A bit of theory, a bit of experimenting, and finally some practical examples. This chapter deals with theory and experimenting, and in the next chapter, we'll deal with the practical examples.

主站蜘蛛池模板: 临颍县| 民县| 蕉岭县| 定安县| 陆丰市| 长顺县| 西乌珠穆沁旗| 微山县| 饶平县| 紫云| 祁连县| 集贤县| 聂荣县| 星子县| 河南省| 沈丘县| 常宁市| 明溪县| 临江市| 沂南县| 惠州市| 霍山县| 育儿| 扶沟县| 常德市| 治多县| 昌吉市| 会昌县| 鹤庆县| 古交市| 合川市| 左贡县| 贺兰县| 丽水市| 余江县| 石楼县| 肃宁县| 南投市| 毕节市| 荥经县| 威信县|