Android AND-401 Exam
Android Application Development (Page 8 )

Updated On: 1-Feb-2026

Which of the following does not have a ContenProvider component provided natively by Android SDK?

  1. The contacts list
  2. The telephone log
  3. The bookmarks
  4. The application list

Answer(s): D

Explanation:

Incorrect:
A: You usually need the MIME type when you are working with a provider that contains complex data structures or files. For example, the ContactsContract.Data table in the Contacts Provider uses MIME types to label the type of contact data stored in each row.
C: The Browser's Bookmark and History content provider URI is in: android.provider.Browser.BOOKMARKS_URI


Reference:

http://developer.android.com/guide/topics/providers/content-provider-basics.html http://jcla1.com/blog/using-content-providers-in-android/



Suppose that the <application> tag in the AndroidManifest.XML file of your application has attribute android.theme=”@style/AppTheme”. Which of the following contents of file /res/value/style.xml correctly applies to the Light Material Theme to your application?

  1. <resources>
    </style name=”AppLightTheme” parent=”android: Theme.Material”>
    </style>
    </resources>
  2. <resources>
    </style name=”MyAppTheme” parent=”android: Theme.Material.Light”>
    </style>
    </resources>
  3. <resources>
    </style name=”AppTheme” parent=”android: Theme.Material”>
    </style>
    </resources>
  4. <resources>
    </style name=”AppLightTheme” parent=”android: Theme.Material.Light”>
    </style>
    </resources>

Answer(s): B

Explanation:

The material theme is defined as:

@android:style/Theme.Material (dark version) @android:style/Theme.Material.Light (light version) @android:style/Theme.Material.Light.DarkActionBar
Example: Add a resources node to styles.xml and define a style node with the name of your custom theme. For example, here is a styles.xml file that defines MyCustomTheme (derived from the built-in Theme.Material.Light theme style):
<?xml version="1.0" encoding="UTF-8" ?>
<resources>
<!-- Inherit from the light Material Theme -->
<style name="MyCustomTheme" parent="android:Theme.Material.Light">
<!-- Customizations go here -->
</style>
</resources>


Reference:

https://developer.xamarin.com/guides/android/user_interface/material_theme/



Which of the following is NOT correct about the Gradle build system of Android Studio?

  1. The Gradle build file is called build.gradle.
  2. Gradle supports generating only one build variant.
  3. Gradle uses the Groovy syntax to configure the build.
  4. A build is configured by using elements provided by the Android plugin for Gradle.

Answer(s): B

Explanation:

The build system can generate multiple APKs with different product and build configurations for the same module.


Reference:

http://developer.android.com/tools/building/plugin-for-gradle.html



Which of the following Activity life-cycle methods is invoked when another activity is shown?

  1. onPause()
  2. onCreate()
  3. onStop()
  4. onDestroy()

Answer(s): C

Explanation:

If an activity is completely obscured by another activity, it is stopped. It still retains all state and member information, however, it is no longer visible to the user so its window is hidden and it will often be killed by the system when memory is needed elsewhere.


Reference:

http://developer.android.com/reference/android/app/Activity.html



Which of the following Material Theme attributes are used to custom the color palette in your application? (Choose Three)

  1. android: colorAccent
  2. android: colorPrimary
  3. android: colorPrimaryText
  4. android: colorPrimaryDark

Answer(s): A,B,D

Explanation:

Example:
To customize the theme's base colors to fit your brand, define your custom colors using theme attributes when you inherit from the material theme:
<resources>
<!-- inherit from the material theme -->
<style name="AppTheme" parent="android:Theme.Material">
<!-- Main theme colors -->
<!-- your app branding color for the app bar -->
<item name="android:colorPrimary">@color/primary</item>
<!-- darker variant for the status bar and contextual app bars -->
<item name="android:colorPrimaryDark">@color/primary_dark</item>
<!-- theme UI controls like checkboxes and text fields -->
<item name="android:colorAccent">@color/accent</item>
</style>
</resources>
Customizing the material theme.


Reference:

http://developer.android.com/training/material/theme.html



Viewing page 8 of 47
Viewing questions 36 - 40 out of 228 questions



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

Join the AND-401 Discussion