Android_Kotlin Flashcards

1
Q

Creating Virtual Device

A
  1. Phone - options
  2. Select - with/without Play store (icon)
  3. Select API
  4. Press Play!
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Details & Advanced options

A

Right side - panel. On the AVD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

.kt

A

stands for Kotlin

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Start of program?

A

MainActivity

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

User functions?

A

Called by ourself

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Packages define

A

Adding outside Code - to our project

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

AppCompatActivity

A

Contains lots of Code - to reuse.

Makes sure App works nicely on different devices

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

onCreate

A

Comes from Bundle package

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When does the GUI start showing?

A

setContentView(R.layout.activity_main)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

R stands for?

A

Resources

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Layout?

A

Layout - folder

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What displays on the Screen?

A

activity_main

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Declared Attributes?

A

Left side

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SP (units) defined?

A

Scaled Independent Pixels

Scale to size of Screen

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Gradle building

A

Compiling code into App

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

View is not constrained, fix?

A

Item (GUI) needs to relate to other elements. Else forced to (0,0) cordinates

17
Q

R.id

A

Reference to the element by Id

18
Q

Simple button click Example

A

val buttonMe = findViewById(R.id.button) as Button

19
Q

Element that needs to be Imported

A

Right click - Import Widget

20
Q

How to acquire element data

A

findViewById( )

21
Q

Button onclick listener

A

.setOnClickListener( )

22
Q

Small text at bottom (Toast Widget)

A

toast.makeText(context: this@MainActivity, text: “Hello”, Toast.LENGTH_SHORT)

23
Q

Text view

A

findViewById(R.id.textView) as TextView