ANDROID PROGRAMMING · 2019-02-22 · activity_main.xml Popup.xml Colors.xml Styles.xml x x Nexus 4...

Post on 25-May-2020

4 views 0 download

Transcript of ANDROID PROGRAMMING · 2019-02-22 · activity_main.xml Popup.xml Colors.xml Styles.xml x x Nexus 4...

ANDROID PROGRAMMINGA QUICK GUIDE TO A BASIC TRIVIA GAME EXAMPLE

ABOUT ANDROID

• Can use Java or Kotlin Programming

Languages

• Doesn’t require Android Device �

Can use an emulator

• All development takes place in the

Android Studio IDE

• https://developer.android.com/studi

o/

STARTING AN

ACTIVITY

• Activity Class

• OnCreate

• Sets a layout

EDITING THE

LAYOUT

• Text Mode vs. Design Mode

EDITING THE

LAYOUT

• Text Mode vs. Design Mode

CONSTRAINT

LAYOUTS

• Add Constraints based on

surrounding objects

• “Parents”

• Other buttons

• Use layout margins as well

ADDING TEXT AND

BUTTONS

• Layout elements called ”Views”

• TextView

• Button

• Add them by text or drag & drop

ADDING SCROLL TEXT

• Same as Textview, just edit some of

the attributes

• android:scrollbars="vertical"

DESIGNING A POPUP

• Create a separate layout

USING STYLES,

COLORS, AND

STRINGS• All about refactoring code

LOOKING AT THE CODE

• Global variables

FINDING AND

SETTING VIEWS

SETTING BUTTON

FUNCTIONALITY

• OnClick Listeners

CREATING THE

POPUP

ADDING POPUP LOGIC