Free AND-401 Exam Braindumps
Android Application Development Questions 86–90 (page: 19)

Updated On: 9-Feb-2026

To add a new Activity to your application, you need to perform the following steps:

  1. Create a Java class that extends View, set a layout, and add an Activity tag in AndroidManifest.xml
  2. Create layout resource only.
  3. Create a Java class that extends Activity, add an Activity tag in AndroidManifest.xml, and create a layout for the activity.
  4. Add an Activity tag to AndroidManifest.xml, and add ACTIVITY permission.

Answer(s): C


Reference:

http://www.itcsolutions.eu/2011/08/31/android-tutorial-how-to-create-a-new-activity-class-with-manifest-editor/



To create a customized Adapter for a compound list item layout, you should:

  1. Extend class android.widget.Adapter or any of its descendants then override method getView()
  2. Extend class android.widget.ListView or any of its descendants, then override method getView()
  3. Extend class android.widget.AbsAdapter or any of its descendants, then override method getView()
  4. Extend class android.widget.Adapter or any of its descendants, then override method getAdapterView().

Answer(s): A

Explanation:

The android.widget.Adapter class included the method getView(), which gets a View that displays the data at the specified position in the data set.


Reference:

http://developer.android.com/reference/android/widget/Adapter.html



When publishing an update to your application to the market, the following must be taken into consideration:

  1. The package name must be the same, but the .apk may be signed with a different private key.
  2. The package name does not have to be the same and the .apk can be signed with a different private key.
  3. The package name must be the same and the .apk must be signed with the same private key.
  4. The package name does not have to be the same, but the .apk must be signed with the same private key.

Answer(s): C

Explanation:

You should sign all of your apps with the same certificate throughout the expected lifespan of your applications.
App upgrade: When the system is installing an update to an app, it compares the certificate(s) in the new version with those in the existing version. The system allows the update if the certificates match. If you sign the new version with a different certificate, you must assign a different package name to the application — in this case, the user installs the new version as a completely new application.


Reference:

http://developer.android.com/tools/publishing/app-signing.html



Which of these is the incorrect method for an Application to save local data?

  1. Extend PreferencesActivity and save in an XML file.
  2. Save as a file in the local file system.
  3. Save in the database using SQLite.
  4. Save in the hash table file using the Dictionary class.

Answer(s): D

Explanation:

Incorrect:
B: You can save files directly on the device's internal storage.
C: Android provides full support for SQLite databases. Any databases you create will be accessible by name to any class in the application, but not outside the application. Reference:
http://developer.android.com/guide/topics/data/data-storage.html



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>

  1. An edit text to the left of a text view and a button beneath it
  2. An edit text to the right of a text view and a button to the right of the text view
  3. An edit text to the right of a text view and a button beneath them
  4. A text view, an edit text beneath it and the button beneath the edit text

Answer(s): C



Viewing page 19 of 47
Viewing questions 91 - 95 out of 228 questions


Post your Comments and Discuss Android AND-401 exam prep with other Community members:

AI Tutor AI Tutor 👋 I’m here to help!