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 a T any time (experiment means that it can be deleted anytime) use Cases
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 parameterandroid:layout_weight android 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 (use LinearLayout if required)
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.
Can be mixed with database data
Saves more memory than Tablelayout
Can be combined 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 the left and right instead of using the TOP or bottom (make absolutely sure does not to use the A or BOTTOM (or any other constants) Layout_gravity settings, as this C Lass is not 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