Your SlideShare is downloading. ×
Rajab Davudov - Android UI Design: Layouts
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Rajab Davudov - Android UI Design: Layouts

2,025
views

Published on

Rajab Davudov - Android UI Design: Layouts

Rajab Davudov - Android UI Design: Layouts


0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,025
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Rajab Davudov
  • 2. What is a Layout ?• A type of resource that defines what is drawn on the screen.• A type of View class whose primary purpose is to organize other controls.
  • 3. Why is a Layout ?• More than 300 deviceswith different – Screen sizes and dimensions – Screen densities – Android versions – OEM skins – Control interfaces
  • 4. Android Layouts• LinearLayout• RelativeLayout• TableLayout• FrameLayout• AbsoluteLayout• …
  • 5. Linear LayoutIn a linear layout, like the name suggests, all the elements aredisplayed in a linear fashion(below is an example of the linearlayouts), either Horizontally or Vertically and this behavior is setin android:orientation which is an attribute of the nodeLinearLayout.<LinearLayout android:orientation="vertical"> .... </LinearLayout>OR<LinearLayout android:orientation=“horizontal"> .... </LinearLayout>
  • 6. Linear Layout
  • 7. Relative LayoutIn a relative layout every element arranges itself relative to otherelements or a parent element.As an example, lets consider the layout defined below. The“Cancel” button is placed relatively, to the right of the “Login”button parallel. Here is the code snippet that achieves thementioned alignment (Right of Login button parallel)
  • 8. Relative Layout
  • 9. Table LayoutTable layouts in Android works in the same way HTML tablelayouts work. You can divide your layouts into rows and columns.Its very easy to understand. The image below should give you anidea
  • 10. Table Layout
  • 11. Absolute LayoutNon-professional and not recommended layout !!!
  • 12. Custom Layout Resource• res/ – layout/ – layout-land/ – layout-xlarge-v11/ – layout-xlarge-land-v11/
  • 13. Density Independent Pixels• dp or dip
  • 14. Ready, Steady, Code !!!
  • 15. Rajab Davudov Senior Developer at Azerfon radjab@gmail.comhttps://market.android.com/developer?pub=RADJABhttp://gplus.to/radjabhttp://www.fb.me/rajab.davudovhttp://www.linkedin.com/in/radjab Market QR Code