1 / 24

Mastering Android Layouts for Golf Scoring App Development

Discover how to enhance your Android app with a practical guide focused on developing a golf scoring application. Learn to update layout files by changing strings, adjusting TextViews, and modifying component properties to create a user-friendly interface. This tutorial covers essential elements such as layout dimensions, drag-and-drop features, and LinearLayout management. Dive into tips for UI rearrangement and testing your design for improved functionality. Perfect your Android development skills and create an engaging golf scoring app experience.

kiril
Télécharger la présentation

Mastering Android Layouts for Golf Scoring App Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Beyond the Hello World -Golf Scores Frank Xu Gannon University

  2. Reference • Learn how to develop for Android, Beyond HelloWorld • http://www.youtube.com/watch?v=rm-hNlTD1H0

  3. main.xml

  4. Layout of Main.xml

  5. TextView = label (Java)

  6. Property (Name,Values pair)

  7. How to change resource “hello” to “title”? • Change “hello” to “title” in string.xml • Change property value of Text from “@string/hello” to “@string/title” in main.xml

  8. Change size of TextView Px:pixle Dp:Density-independent Pixels. an abstract unit that is based on the physical density of the screen.  Sp: Scale-independent Pixels - this is like the dp unit, but it is also scaled by the user's font size preference.

  9. Add buttons Drag&drop

  10. Add button

  11. How to Change ID and Text

  12. Add More Components

  13. Mapping UI to XML

  14. Rearrange components Add LinearLayoutScorePanel Move up and down Rearrange components use up and down

  15. Main.xml again

  16. LayoutParams • Describes how big the view wants to be for both width and height. • FILL_PARENT • Renamed MATCH_PARENT in API Level 8 and higher • The view wants to be as big as its parent (minus padding) • WRAP_CONTENT • The view wants to be just big enough to enclose its content (plus padding)

  17. Layout Width

  18. Button Layout Take as much as space as possible

  19. New Look • Can you finish yours like this? • Hints • Scores • Gravity: center • Padding: 10sp • - weight: 1 • +weight:1 • 99 weight: none • OK weight: 0.5

  20. Test your UI

More Related