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

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.

主站蜘蛛池模板: 乌拉特中旗| 新田县| 吉安县| 旬阳县| 洛川县| 冕宁县| 兴宁市| 仁化县| 富阳市| 景泰县| 昭觉县| 安溪县| 汪清县| 庆云县| 玛曲县| 汤原县| 达州市| 广河县| 南陵县| 如东县| 上犹县| 南昌市| 东宁县| 石阡县| 岳阳县| 繁峙县| 璧山县| 桐庐县| 大宁县| 威海市| 绩溪县| 炉霍县| 西乌珠穆沁旗| 台东县| 尉氏县| 鄂温| 丰都县| 鹤山市| 临桂县| 陆良县| 大丰市|