Skip to content

Latest commit

 

History

History
15 lines (13 loc) · 750 Bytes

Android_1.md

File metadata and controls

15 lines (13 loc) · 750 Bytes

Android 1 Workshop

XML structure:

  • Tags indicate the structure (eg. <LinearLayout> … </LinearLayout>, <TextView … />)
  • Various attributes can also be set inside of the tags (eg. android:Text = “Hello”) Linear layout:
  • Can have vertical or horizontal orientation
  • The order that you put the xml blocks is the order that the elements appear Views/UI Elements
  • Must indicate width and height (either match_parent, wrap_content, or fixed value)
  • ImageViews: can set the src to be an image that you include in the app files
  • TextViews: can set text, font family, textSize, etc
  • Buttons: can set clickable, text, background
    • In the java file, you can include attach an onClickListener(..) to allow for user interaction