Quiz 1-3 Flashcards

1
Q

Who is the creator of Android Inc.?

A

Andy Rubin

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

In Java, if your onCreate( ) function has the line:

 setContentView(R.layout.menu_list);

What is the name of the file to load? Just write the file name and extension (XML), not any of the directory names.

A

menu_list.xml

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

What tag name goes in the missing spot? What replaces the ??? below:

<AA><BB></BB><CC></ ??? >

Just put the name, not the brackets </ >:
</CC></AA>

A

CC

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

What xmlns parameters is used for defining the namespace:

A

xmlns:app=

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

Which parameter in the AndroidManifest.xml file controls which picture gets installed on your phone as the application icon?

A

android:icon

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

Match the filename colour to what it means for a file in git:

____
the file was added but never committed

____
the file was created but never added

____
the file was committed and hasn’t changed

____
the file was committed but then deleted

____
the file was committed but then modified

A

Match the filename colour to what it means for a file in git:

Green
the file was added but never committed

Red
the file was created but never added

Black
the file was committed and hasn’t changed

Grey
the file was committed but then deleted

Blue
the file was committed but then modified

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

Which processor architecture (or ABI) should you use for creating an Android virtual device on a Windows computer?

A

x86_64

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

Which processor architecture (or ABI) should you use for creating an Android virtual device on a Macintosh computer?

A

arm64-v8a

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

What should the android:orientation= if you want widgets to be listed from top to bottom?

A

android:orientation=”vertical”

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

What does the function findViewById( int id ) return if the id isn’t found?

A

Null

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

If a function is declared as:

void setSomething( ASomethingObject obj);

and the Interface ASomethingObject is declared having only function:

void somethingHappened(int num, String message),

how should setSomething( ) be written using lambda functions?

A

setSomething( (num, message) -> { } );

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

Which function returns the height of a widget?

A

getHeight()

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

If you add a widget in XML called <SpinningWheel>, what is the name of the Java class that should be found just before calling findViewById( )?</SpinningWheel>

A

android.widget.SpinningWheel sWheel = findViewById(R.id.spinningWheel)

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

When you are converting your app to an Android TV app, how many pixels margin should you put at the top of the screen. Just write the number and nothing else.

A

27

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

Let’s say you have a directory called: values-fr-rFR
and it has a strings.xml file with <string>Bonjour</string>

You also have a directory called: values-fr
and it has a strings.xml file with <string>Allo</string>

You also have a directory called: values
and it has a strings.xml file with <string>Hello</string>

What will the value of @strings/message be if you set the phone’s language to French from Belgium (fr-rBE)

A

Allo

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

What command would you type on the command line to create a branch called Week3 in git.

A

git branch Week3

17
Q

When you are making an AndroidTV app, which tag parameter do you use to say which element is selected next when you click the down arrow on the direction pad? In other words, what is the missing word here: android:???????=”@id/…”

A

nextFocusDown

18
Q

T/F - Setting the width of a widget to “wrap_content” will make it take up the entire space available on the screen.

A

False

19
Q

What is the XML tag that makes an Android application not require a touch screen, like for a TV app. Excluding the <>

A

uses-feature android:name=”android.hardware.touchscreen” android:required=”false” /