-
Android:layout_weight
In the layout file, add a button below the ListView, and if you do not set this option, the following controls, such as button, cannot be displayed if the list item is more than one screen display, if added in the ListView layout: Android:layout_ weight= "1", you can guarantee the display of the button.
In only two controls in the ListView and button if the ListView is set to Android:layout_weight= "1", the button does not set the property, You can understand that after you have reserved the display space for a button, the ListView will occupy all of the remaining layout space.
-
Control naming:
<TextView/>: [title|text| ...] _xxx, in most cases as a static control, according to the role of TextView to add a prefix, such as a small title with the title, as an informational hint can be used text
<ListView/>: XXX, as a dynamic control of regular content changes, directly according to the purpose of the use of the name can be;
<button/>:button_xxx, add Button directly as prefix;
...
-
Android:text,android:hint
The character information used is named directly with the control ID, and the two are r.id.xxx,r.string.xxx under different namespaces, using the same name, which is neither confusing nor easy to name and easy to use.
-
This article is from "Whispering Autumn Wind" blog, please be sure to keep this source http://xjhznick.blog.51cto.com/3608584/1558939
Android file Layout Some details memo