1/55
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
True or False: All ViewGroup derivations accept nested View elements.
False
Some ViewGroups determine their children only from an ______ using the AdapterView class.
Adapter
An activity class loads all the UI component using the XML file during the ______ method.
onCreate()
Activity is one of the most important component for any android app. Activities are the User Interface (UI) screens which user see.
False
This callback method is called when the user navigates back to the screen of your application after using another/different application.
onResume()
You implement an activity as a subclass of the Content Provider class.
False
The onCreate() and onDestroy() methods are called only once throughout the activity lifecycle.
True
An Android activity represents one screen of the Android application's user interface.
True
When another activity is called within the application, the current activity will call the ______ method.
onPause()
When you open an application, onResume() method is called after.
onStart()
Activity class takes care of creating a window for you in which you can place your UI with setContentView(View).
True
The onResume() callback method is called whenever the activity becomes visible to the user.
False
An individual UI component generally referred to as a "widget".
View
What is a layout in Android?
A container that defines the structure of a user interface
TextView is an example of ______.
View
View is something that the user can see and interact with.
True
A unique resource name for the element, which you can use to obtain a reference to the View or ViewGroup from your application.
Resource ID
The onClickListener is an event handler.
True
The onClickListener is called when the user either clicks or touches or focuses upon any widget like button, text, image etc.
False
You can create your layout in Android using HTML.
False
Implicit intents do not name a specific component, but instead declare a general action to perform, which allows a component from another app to handle it.
True
How do you start a new Activity using an Intent?
startActivity(intent)
Give the method that is used to pass data to another Activity.
putExtra()
The target component which receives the intent can use the putExtras() method to get the extra data sent by the source component.
False
What are the main types of Intents?
Explicit and Implicit
Intent can be use to launch an activity.
True
Implicit intents are often used to activate components in other applications.
True
We can use the Intent.getExtras() in the target activity/class to get the attached bundle and extract the data stored in it.
True
Explicit intents specify which application will satisfy the intent, by supplying either the target app's package name or a fully-qualified component class name.
True
How do you retrieve a value passed through an Intent?
getIntent().getExtras().getString("key")
You release version 1 of your app with a Notes table. In version 2, you want to add a new column description. Which method should you override to handle schema changes?
onUpgrade()
A standard toast notification appears near the ___ of the screen.
bottom
To get the value from a field in a JSON object, we can issue the getString method to retrieve the desired value from a field.
True
Which class is used to create notifications in Android?
NotificationCompat.Builder
Which SQLite method returns a Cursor for query results?
db.query()
The makeToast() method takes three parameters: the application Context, the text message, and the duration for the toast.
True
Beginning with Android 5.0, notifications can appear on the lock screen.
True
Since the cursor starts at position -1, calling moveToNext() places the "read position" on the first entry in the results.
True
To get an array from a field in a JSON object, we can issue the getJSONObject method to retrieve the desired value from a field.
False
Which line gets Jane's name using org.json? (JSON data is provided)
json.getJSONObject("company").getJSONArray("employees").getJSONObject(1).getString("name")
Which method inserts a new row into a database table?
insert()
The return value for the delete() method indicates the number of rows that were deleted from the database.
True
Can a JSON object contain another JSON object or array as a value?
True
You are creating a local SQLite database in your Android app to store user notes. You need a class that manages database creation and version management. Which class should you extend to create your database helper?
SQLiteOpenHelper
What is required to create a notification channel?
Channel ID, Name, and Importance
Which class is used to manage and send notifications?
NotificationManager
What is the purpose of a Notification Channel in Android (API 26+)?
To group notifications for easy management
In Android, notifications can include all EXCEPT:
JavaScript execution
Which method is called when the database is created for the first time?
onCreate()
What will this JSON represent? (JSON data is provided)
A JSON object with one array of student objects
How do you prevent SQL injection in Android SQLite?
Use parameterized queries or ContentValues
Given the JSON below, determine which of the following is correct.
iii only (The statement "iii. given name is an array" is correct)
What is the default priority for a notification if not explicitly set?
Default
We can insert data into the database by passing a ContentValues object to the insert() method.
True
SQLiteOpenHelper is a helper class to manage database creation and version management.
True
JSONStringer is a utility class to build a JSON Text quickly which confirms to JSON Syntax rules.
True