Lesson 1 Flashcards

Create Project Sunshine

1
Q

Project Structure (cmd ;), ->app -> flavors

A

versions

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

AVD

A

Android Virtual Device

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

stack

A

application layer, application framework, c/c++ libs & Android Runtime, Linux Kernel

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

ADB

A

Android Debug Bridge

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

ADB commands

A

push, pull, shell, logcat…

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

gradle task

A

atomic work for build

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

./gradlew tasks

A

run on command line to list runnable gradle tasks

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

adb list commands

A

enter adb into terminal

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

Apps are…

A

collections of connected components

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

4 types of app components

A

Activity, Service, Content Provider, Broadcast Receiver (BACS) | (Br, A,S,Cp)

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

Android Manifest does what with components?

A

Register components

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

Activity

A

Component responsible for user interaction (view); a “single focused thing the user can do”.
Responsible for creating the window the application uses to draw and receive events from the system.

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

Experience of App, Activities

A

Experience app as a sequence of activities, beginning with launcher. Kept as a stack.

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

Android Manifest’s launcher

A

launch tag for application. Registered to an activity, with an intent filter for launching.

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

what layout does for activity

A

layout contains information about what to display, and how to display it.

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

res folder

A

application resources

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

resources

A

strings, images, files, layouts

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

layout file

A

xml format, contains view objects

19
Q

onCreate in java activity, layout

A

setContentView to some layout; “inflates layout… Android reads your XML file and generates Java objects for each of the tags in your layout file”; i.e. instantiates layout

20
Q

views

A

created by activity to show information, and be interacted with. Rectangular area responsible for drawing and handling events.

21
Q

xml layout file; for activity, stored where

A

how an activity determines what views to create + where to put them. Stored in res folder “layouts”

22
Q

UI components

A

view type that’s often interacted with. E.g. TextView, EditText, ImageView, Button, Chronometer

23
Q

Layout/Container_View

A

typically contain group of views, determine position. E.g. LinearLayout, RelativeLayout, FrameLayout, ScrollView, ConstraintLayout

24
Q

wrap_content

A

shrink view to wrap whatever is inside the view

25
match_parent
expand view to parent's size
26
app/build.gradle
contains dependencies; eg. dependency for constraint layout: "com.android.support.constraint:constraint-layout:1.0.0-beta4". In Gradle scripts.
27
where to instantiate TextView?
inside activity's java, after inflating a layout with that TextView
28
how to connect inflated TextView with activity code?
1. use id 2. declare TextView as property of class, 3. inflate layout with TextView in OnCreate: setContentView(R.layout.activity_main); 4. in onCreate, set TextView to id: "findViewById(R.id.tv_toy_names)"
29
layout id syntax
e.g.: "@+id/tv_toy_names" @ : "treat stuff inside quotes as not a string literal, but look for contents inside Android Resources. + : create id if doesn't already exist id : creating an id, not reference (style, string, image) creates an id inside Resources, where above becomes R.id.tv_toy_names
30
steps to add TextView
1. add ID to TextView in layout 2. Find ID for TextView in MainActivity.javasource 3. Append the contents to TextView
31
Array syntax Java
String[]
32
for-each loop Java syntax
``` for ( : ) { // do thing with item } ```
33
xml syntax
TODO (?)
34
widgets
single-purpose views, such as buttons, edit-text
35
constraint layout - special layout how?
uses constraints to allow for dynamic layouts; different window sizes
36
Why LinearLayout, GridLayout, ConstraintLayout?
No absolute layout; dynamic size. Follow principles of "responsive design"
37
FrameLayout for?
only one child view; like a listview that fills content area. Put in corners
38
LinearLayout for?
Stack views vertically or horizontally
39
ConstraintLayout for?
Complex, powerful. Figure out each view's position specifically.
40
XML Framelayout
41
constraint layout dependency
remove/add "implementation 'com.android.support.constraint:constraint-layout:1.1.3'" in build.gradle.dependencies
42
Java Array init with values
{"str1", "str2", "str3"};
43
Getting inflated layout views in OnCreate
``` Class { property; OnCreate(){ property () } } ```
44
setContentView?
in onCreate, setContentView to xml file