XAM1 - Android Flashcards

1
Q

In Android everything is done with what?

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

What does an Activity consist of?

A
  • XML layout (axml)

- C# code file

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

How do you define app primary entry point?

A
  • MainLauncher = true
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Can you include java jar libraries in Xam Android apps?

A
  • yes
  • there are 2 methods
  • one easier, one more complex
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How do you associate Activity code behind to UI markup?

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

How do you access controls on UI view?

A
  • FindViewById

- ex FindViewById(Resource.Id.myButton)

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

What are Views?

A
  • Sometimes called widgets

- ex TextView, EditText, Button

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

What are types of Layouts?

A
  • LinearLayout (like StackLayout)
  • GridLayout
  • RelativeLayout
  • NestedLayout (nest other layout types)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Where are layouts located?

A
  • they are considered Resources so go under Resources folder in axml files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Properties on UI views should use what syntax?

A
  • android: namespacing convention
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does compiling an Android app include?

A
  • Java SDK (JDK)
  • Android SDKs
  • Mono.NET
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Can you code against specific Android versions?

A
  • yes

- use Android.OS.Build.VERSION.SdkInt checked against Android.OS.BuildVersionCodes.whatever enum

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

What is Context in Android?

A
  • represents Android runtime environment surrounding your activity and also provides additional services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is Explicit Intent?

A
  • you are telling Android exactly what you want to load

- generally used to start Activity inside your APK

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

What is Implicit Intent?

A
  • tell Android you need to do something and it will decide what to load
  • often loads outside of your APK
  • ex; I want to take a picture
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is an Intent?

A
  • a request sent to Android telling it about activity you want
  • pass it a Context (this, current Activity) and a Type (typeof(NewActivity))
17
Q

How do you pass data between Activities?

A
  • Bundles, key value pairs of simple types or serialized objects
  • intent.PutExtra
18
Q

How do you fire a new Activity?

A
  • StartActivity or StartActivityWithResult
19
Q

What are 3 return types for an Activity?

A
  • no return
  • success/fail
  • success/fail with data
20
Q

What happens when an Activity with result returns?

A
  • fires OnActivityResult in source passes back RequestCode (INT)
21
Q

How do you setup an Implicit Intent?

A
  • use intent.SetAction to set action type

- use intent.SetData and intent.PutExtra to provide extra information per documentation

22
Q

Can you verify an implicit intent is available at runtime?

A
  • yes

- intent.ResolveActivity(PackageManager)