I would like to know pros/cons between the different Android design layouts. In some cases I feel I could choose between linear layout or table layout, or some times between linear layout and Relative layout. I would like to know the following
Could someone please provide a comparison between the layouts ( Linear, relative, absolute, table, frame etc )?
The names of the layouts are quite descriptive: you will use a LinearLayout
when you want a linear line of views, a table when you want a table, etc.
When you have complicated layouts, RelativeLayout
is the preferred choice.
All of them will drawn in a relatively similar time. What you need to try to avoid is to create too many nested layouts (e.g., LinearLayout
inside LinearLayout
).
Take some time an watch this video: Romain Guy's Google I/O 2009 talk. Lots of information to get from there about layout efficiency.
This is great link for your answer. http://www.learn-android.com/2010/01/05/android-layout-tutorial/
Relative layout is best as its easy to manage controls on UI. but if you want data in tabular format then table layout is great. I hope it helps !!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With