Android AND-401 Android Application Development Online Training
Android AND-401 Online Training
The questions for AND-401 were last updated at May 10,2025.
- Exam Code: AND-401
- Exam Name: Android Application Development
- Certification Provider: Android
- Latest update: May 10,2025
Method onDraw() of class android.view.View has the following signature:
- A . public void onDraw(Color)
- B . public void onDraw(Canvas)
- C . public boolean onDraw(Canvas)
- D . public Canvas onDraw()
To add a new Activity to your application, you need to perform the following steps:
- A . Create a Java class that extends View, set a layout, and add an Activity tag in AndroidManifest.xml
- B . Create layout resource only.
- C . Create a Java class that extends Activity, add an Activity tag in AndroidManifest.xml, and create a layout for the activity.
- D . Add an Activity tag to AndroidManifest.xml, and add ACTIVITY permission.
To create a customized Adapter for a compound list item layout, you should:
- A . Extend class android.widget.Adapter or any of its descendants then override method getView()
- B . Extend class android.widget.ListView or any of its descendants, then override method getView()
- C . Extend class android.widget.AbsAdapter or any of its descendants, then override method getView()
- D . Extend class android.widget.Adapter or any of its descendants, then override method getAdapterView ().
When publishing an update to your application to the market, the following must be taken into consideration:
- A . The package name must be the same, but the .apk may be signed with a different private key.
- B . The package name does not have to be the same and the .apk can be signed with a different private key.
- C . The package name must be the same and the .apk must be signed with the same private key.
- D . The package name does not have to be the same, but the .apk must be signed with the same private key.
Which of these is the incorrect method for an Application to save local data?
- A . Extend PreferencesActivity and save in an XML file.
- B . Save as a file in the local file system.
- C . Save in the database using SQLite.
- D . Save in the hash table file using the Dictionary class.
Which UI does the following code builds?
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android=http://
schemas.android.com/apk/res/android
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Name:" />
<EditText
android:id="@+id/editText1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:ems="10" />
</LinearLayout>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Post" />
</LinearLayout>
- A . An edit text to the left of a text view and a button beneath it
- B . An edit text to the right of a text view and a button to the right of the text view
- C . An edit text to the right of a text view and a button beneath them
- D . A text view, an edit text beneath it and the button beneath the edit text
Consider the following code:
Intent i = new Intent(this, MainActivity.class);
i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(i);
What best explains the code above?
- A . The activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent.
- B . Any existing task that would be associated with the activity to be cleared before the activity is started.
- C . A new Activity will be launched and it will be on the top of the stack
- D . A new activity will be launched but will be in full-screen mode.