Android UI layouts:graphics Design Using the ViewGroup ClassAndroid viewgroup superclass:a Foundation for Layouts The ViewGroup layoutparams class:layout ParametersDeprecated Layouts:absolutelayout and Slidingdrawer
Absolutelayout 3 version 1.5
Slidingdrawer version 4.2 (drawerlayout can replace)
Android ' s experimental layout:slidingpanelayout"Experimental" means that the layout container could is removed at any time (experiment means it can be removed at all times)Case
Logical UI design usage of the Slidingpanelayout container should include pairings of panes with logical use bindings. An example of would is a phone number list with related dial or tagging features, a city or street list with related Map features, a contact list and UI allowing interaction with the contact, or a recent e-mail list with a content pane dis Playing the message in the selected e-mail.
Support for the use of weight layout parameter android:layout_weightAndroid relativelayout class:designing Relative LayoutsAndroid linearlayout class:designing Linear Layouts
To set a weight, use a zero if the layout container are not to being stretched or use a decimal number between 0.0 and 1.0 to Prorate any of those extra pixels amongst all of the UI elements (child tags) within the container.
Android framelayout class:designing Frame LayoutsAttention:
It's important to note the child tags (View widgets) that's currently invisible because they ' ve been specified via an Android View.gone constant instead of using view.invisible would be utilized for framelayout container sizing purposes only If the. Setconsidergonechildrenwhenmeasuring () method is called using a true parameter.
Android GridLayout class:designing UI Layout GridsAdd in Level 14
The Android space class is a lightweight View subclass so can be used to create empty Space between user interface Eleme NTS in layout containers like GridLayout
Does not currently provide support for the parameter called weight (if required, use LinearLayout)
You should not need-either of the Android size value constants Wrap_content or match_parent when you are Configurin G The child tags (UI elements) within your GridLayout container.
Ability to mix with database data
Saves more memory than Tablelayout
Able to combine with framelayout. To make more complex effects
As I mentioned earlier, basic framelayout configurations can be nested and accommodated inside the cells of a GridLayout b Ecause a single cell can contain multiple View or ViewGroup objects.
To switch between-viewgroup objects, you would place both of them in the same cell, and then leverage each V IA a visibility parameter by using the constant GONE on order to switch between one viewgroup to the other viewgroup (or V Iew) from inside your Java code.
The drawerlayout class:designing UI Drawer Layouts
Package:android.support. V4.widget
Android:layout_gravity
correspond to the side of the screens from which your want your UI Drawer to dragged off from
Use left and right. The TOP or BOTTOM (or any other constants) Layout_gravity settings, as this class, cannot be used up and down (make absolutely sure) Intended to provide vertical drawers, only horizontal ones, and would likely throw an exception.)
Android:layout_height
Match_parent
Android:layout_width
You would next use the fixed width so want to use for the UI Drawer width, specified using a DIP value
Drawerlayout.drawerlistener
Java code can do things when the drawer is open, closed, or being dragged.
Ondrawerclosed (). Ondraweropened (), Ondrawerslide (), ondrawerstatechanged ()
State_idle
State_dragging. State-settling,lock_mode_unlocked,lock_mode_locked_open,lock_mode_locked_closed
Drawerlayout.simpledrawerlistenerAdding Menu Items to Access the UI Layout Container
Order (Android:orderincategory)
Creating a table of Contents Activity for Your UI designcreating a XML Table of Contents linearlayout UI Design Adding Te XT UI Widgets to the TOC UI Layout Container Using onoptionsitemselected () to ADD Menu functionality testing the Table of Contents Activity on the Nexus one
"Pro Android Graphics" Sixth section of reading notes