Quiz 1-3 Flashcards
Who is the creator of Android Inc.?
Andy Rubin
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.
menu_list.xml
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>
CC
What xmlns parameters is used for defining the namespace:
xmlns:app=
Which parameter in the AndroidManifest.xml file controls which picture gets installed on your phone as the application icon?
android:icon
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
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
Which processor architecture (or ABI) should you use for creating an Android virtual device on a Windows computer?
x86_64
Which processor architecture (or ABI) should you use for creating an Android virtual device on a Macintosh computer?
arm64-v8a
What should the android:orientation= if you want widgets to be listed from top to bottom?
android:orientation=”vertical”
What does the function findViewById( int id ) return if the id isn’t found?
Null
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?
setSomething( (num, message) -> { } );
Which function returns the height of a widget?
getHeight()
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>
android.widget.SpinningWheel sWheel = findViewById(R.id.spinningWheel)
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.
27
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)
Allo