Android development is really fun. Much more fun than Windows Mobile. Although which WYSIWYG view design environment can be bad. However, the use of design views such as description language (XML, HTML) seems to be the preferred approach of various technology camps, and WPF has taken this approach, where descriptive text languages are still more comfortable to read. However, the description language of WPF is too powerful, which makes people feel confused.

Let’s take a look at today’s results

\

 

If it looks like this, it’s a simple login screen. Andord’s layout is really, really, which. Hard stuff to master, huh, but once you get to the bottom of it, it’s always fun. Streaming layouts are always simpler and easier to control than Windows Mobile’s absolute layout. I am more and more inclined to the streaming layout method, one of its advantages is that it is relatively flexible to adapt to the device, WM uses adaptive DPI method, which is not called a complex ah, cut not easy to control.

 

First of all, the LinearLayout is really an important thing. It has a direction property, indicating that it is horizontal or vertical. The layout has an important property called Android :background, which specifies a background image. For example: Android :background=”@drawable/images1″, which specifies the location of a resource file. I googled this resource file, but I didn’t know where to put it. Then I copied and pasted it into the drawable-hdpi directory under res, and it worked. Look at the tutorial less, the fumble come, the master will not point out such a simple problem, like our.net camp side dish using the angry Eclipse, and do not know exlipse compilation button is where, only know run, how can understand such a difficult skill. Ha, laugh at yourself.

 

Android :layout_width=”fill_parent”, which tells you to fill as much space as the parent container has. Android :layout_width=”wrap_content”, which indicates how much space it needs on its own, just as the parent container demands as much space, how to say, as fat as it takes up. And which fill_parent is neither fat nor full.

Android :layout_weight=”0.1″, this weight(weight) is an interesting thing. You can set the weight property for the “children” of a parent container, and the parent container allocates space to the children depending on how much weight the parent chooses. This property also affects the display mode of the child control’s width and height properties (fill_parent or WRap_content).

Down on the layout of the nesting. It’s just like an HTML div. The code:

< LinearLayout XMLNS: android = “schemas.android.com/apk/res/and…” android:orientation=”vertical” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:background=”@drawable/images1″ >
< / TextView > < EditText android: layout_weight = “0.25” android:layout_width=”fill_parent” android:text=”mailto:%22  %20android:id=%22@+id/editBoxAccount” android:layout_height=”wrap_content”>

</LinearLayout>

Conclusion: early heard android name, only when he fell into the poor level to accept and understand, and I, still playing Microsoft has abandoned the Development of Windows Mobile,.NET CF, it seems that for graduation heard a word “follow Microsoft, eat and drink all”, but no longer effective. Windows Phone 7 is still in the dark, and it faces great challenges in terms of user acceptance and developer support. Android has fallen into the common class, and its future is still unknown. WCF, silverLight, which is described by the heavyweight XAML language, is not well promoted. In short, Microsoft is no longer what it was a few years ago, a giant machine that is spinning furiously without much technological change. Instead, Google…

Tired, sleeping. Years of fainting have passed…

———-

Source code download