node of the layout. The layout hierarchy is traversed in the order of declaration. Parents are drawn before their children and children are drawn in the order of declaration.
a requirement for either the width or the height. Is comprised of a size and a mode. There are 3 possible modes: UNSPECIFIED EXACTLY AT_MOST MeasureSpec
changes that might affect the size or shape of the view. You have to invalidate the view after any change to its properties that might change its appearance. requestLayout() invalidate()
many situations. Simple to implement. 1. Subclass one of the built-in layouts. 2. Inflate a merge layout in the constructor. 3. Initialize members to point to inner views with findViewById(). 4. Add your own APIs to query and update the view state. Compound views
at View.BasedSavedState class. The canvas API allows to create complex graphical effects: Canvas, Paint and Shader classes will help with this. Saving view state Custom and advance drawing
objects ahead of time is an important optimization. Initialize your stuff in OnAttachToWindow() method when possible. If you do not need complex measurement just use onSizeChanged() method. If you define own views, ensure you review the ViewConfiguration class. When using custom attributes always recycle your TypedArray. Tips and tricks