Declaring Layout | Android Developers
- android:id="@+id/my_button"
- The at-symbol (@) at the beginning of the string indicates that the XML parser should parse and expand the rest
of the ID string and identify it as an ID resource. The plus-symbol (+) means that this is a new resource name that must
be created and added to our resources (in theR.javafile). There are a number of other ID resources that
are offered by the Android framework When referencing an Android resource ID, you do not need the plus-symbol,
but must add theandroidpackage namespace, like so:android:id="@android:id/empty"
How Android Draws Views | Android Developers
- Drawing the layout is a two pass process: a measure pass and a layout pass. The measuring
pass is implemented inmeasure(int, int)and is a top-down traversal
of the View tree. Each View pushes dimension specifications down the tree
during the recursion. At the end of the measure pass, every View has stored
its measurements. The second pass happens in
layout(int, int, int, int)and is also top-down. During
this pass each parent is responsible for positioning all of its children
using the sizes computed in the measure pass.
Posted from Diigo. The rest of my favorite links are here.
没有评论:
发表评论