Android Erası 2 - UI və layoutlar
Upcoming SlideShare
Loading in...5
×
 

Android Erası 2 - UI və layoutlar

on

  • 1,098 views

 

Statistics

Views

Total Views
1,098
Views on SlideShare
1,048
Embed Views
50

Actions

Likes
0
Downloads
1
Comments
0

2 Embeds 50

http://www.hackathonazerbaijan.org 47
http://androidage2.hackathonazerbaijan.org 3

Accessibility

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Android Erası 2 - UI və layoutlar Android Erası 2 - UI və layoutlar Presentation Transcript

  • Rajab Davudov
  • 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.
  • Why a Layout ?• More than 300 deviceswith different – Screen sizes and dimensions – Screen densities – Android versions – OEM skins – Control interfaces
  • Android Layouts• LinearLayout• RelativeLayout• TableLayout• FrameLayout• AbsoluteLayout• …
  • 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>
  • Linear Layout
  • 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)
  • Relative Layout
  • 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
  • Table Layout
  • Absolute LayoutNon-professional and not recommended layout !!!
  • Custom Layout Resource• res/ – layout/ – layout-land/ – layout-xlarge-v11/ – layout-xlarge-land-v11/
  • Density Independent Pixels• dp or dip
  • Think, Design, Code !!!
  • 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