Ad

Friday, August 3, 2018

Android Basics - Views and ViewGroups

Common views

TextView, ImageView, ButtonView

Nested View Groups

Putting views inside other views. Nesting can be costly and get expensive if there are too many layers of nesting. 

Best practice using Android Views

  • The view that contains all the views is the root view. 
  • Can organize material design cards into view groups, the button, icon and image inside the card are all nested views. 
  • The linearlayout horizontal and vertical orientations are extremely important.
  • If the elements are not horizontally or vertically spread out, relative layout may be better.
  • Draw a view hierarchy diagram to organize views
  • Indent children views
  • Set layout_width, layout_height dynamically using match_parent or wrap_content

No comments:

Post a Comment

Codecademy - Machine Learning Fundamentals - Syllabus

Upgrade your skills with Codecademy's Pro Intensive, Machine Learning Fundamentals. Each unit will cover conceptual and syntax lessons ...