Free AND-401 Exam Braindumps (page: 31)

Page 31 of 58

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



Which of the following adds a click listener to items in a ListView?

  1. setonClickListener
  2. setonItemClickListener
  3. setonItemClicked
  4. setonListItemClickListener

Answer(s): B

Explanation:

SetOnItemClickListener(AdapterView.OnItemClickListener listener) registers a callback to be invoked when an item in this AdapterView has been clicked.
Note: An AdapterView is a view whose children are determined by an Adapter. Incorrect:
A: SetOnClickListener (View.OnClickListener l) registers a callback to be invoked when this view is clicked. If this view is not clickable, it becomes clickable.


Reference:

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



Which one of the following statements is NOT a function of the Action Bar?

  1. It provides a dedicated space on the screen to identify the current activity to the user.
  2. It facilitates the accessibility to important application actions.
  3. It loads web URLs to display HTML pages.
  4. It supports consistent navigation and view switching within apps.

Answer(s): C

Explanation:

The key functions of the app bar are as follows:
A dedicated space for giving your app an identity and indicating the user's location in the app. Access to important actions in a predictable way, such as search.
Support for navigation and view switching (with tabs or drop-down lists).


Reference:

http://developer.android.com/training/appbar/index.html



Page 31 of 58



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

Pooja commented on December 27, 2024
Very useful for exam
CHINA
upvote

Sudeep commented on December 27, 2024
Good collection
Anonymous
upvote

Akki1990 commented on December 27, 2024
I am happy !
Anonymous
upvote

Imran commented on December 27, 2024
This is nice stuff
Anonymous
upvote

Akki1990 commented on December 27, 2024
This is really good way to revise all topics , Thank you so much !
Anonymous
upvote

Saf commented on December 27, 2024
Very Useful
Anonymous
upvote

Hekka commented on December 27, 2024
Good set of questions
Anonymous
upvote

Amber commented on December 27, 2024
Passed the exam today. It is going to be a great new year.
UNITED STATES
upvote

Microsoftee commented on December 27, 2024
Thank you so much. Nice material.
Anonymous
upvote

sandy commented on December 27, 2024
good content
Anonymous
upvote

anonymous a commented on December 27, 2024
helpful stuff
Anonymous
upvote

Ravi commented on December 27, 2024
So far so good
INDIA
upvote

Poo commented on December 27, 2024
Useful data
Anonymous
upvote

Cosy commented on December 26, 2024
I am loving it here
Anonymous
upvote

Tanuja Bhusal commented on December 26, 2024
Good Questions
Anonymous
upvote

anonymous commented on December 26, 2024
Just going through the questions for my understanding of Power Bi
UNITED STATES
upvote

laks commented on December 26, 2024
so far seems good
UNITED STATES
upvote

Mooni commented on December 26, 2024
It's really good
SAUDI ARABIA
upvote

Phoebe commented on December 26, 2024
Good questions
FRANCE
upvote

rz commented on December 26, 2024
It's very helpful for exam
TAIWAN PROVINCE OF CHINA
upvote

Nitesh Kumar Singh commented on December 26, 2024
Nice to attend
Anonymous
upvote

Pankaj Kumar commented on December 26, 2024
Its good to have all the relevant questions here.. Thanks for help!
UNITED STATES
upvote

ian commented on December 26, 2024
yes, is this still valid?
UNITED STATES
upvote

Onkar commented on December 26, 2024
Questions looks promising.
Anonymous
upvote

JcD commented on December 25, 2024
Great learning
Anonymous
upvote

Sam commented on December 25, 2024
Are these real questions? They seem too easy to be true
UNITED STATES
upvote

Netra commented on December 25, 2024
Very useful
UNITED STATES
upvote

Prg commented on December 25, 2024
good set of questions
Anonymous
upvote

n commented on December 25, 2024
Question are
Anonymous
upvote

Ni commented on December 25, 2024
useful questions
Anonymous
upvote

ry commented on December 24, 2024
very helpful
Anonymous
upvote

Jatin Gohil commented on December 24, 2024
Good contents. The exams questions are real
Anonymous
upvote

Anonymous commented on December 24, 2024
very useful
CHILE
upvote

Mohamedk commented on December 24, 2024
It's very nice
Anonymous
upvote