1.
View pager is used for
Correct Answer
A. Swiping Fragments
Explanation
The correct answer is "Swiping Fragments." A View Pager is a layout manager that allows the user to swipe left or right to navigate between different fragments within an activity. It is commonly used in scenarios where there is a need to display multiple screens or content in a single activity, such as in a tabbed layout or a slideshow. By swiping fragments, the user can easily switch between different sections of an app or view different pieces of content without having to navigate to a separate activity.
2.
Nesting in layouts is not supported in android
Correct Answer
B. False
Explanation
Nesting in layouts is supported in Android. This means that you can have a layout inside another layout, allowing for more complex and nested UI designs. By nesting layouts, you can create a hierarchy of views and organize them in a structured manner. This feature is commonly used to create more advanced and dynamic user interfaces in Android applications.
3.
Is this possible to add views in a layout dynamically?
Correct Answer
A. Yes
Explanation
Yes, it is possible to add views in a layout dynamically. This can be achieved by using methods such as `addView()` or `inflate()` in Android. These methods allow for the creation and addition of views programmatically at runtime, giving developers the flexibility to modify the layout based on certain conditions or user interactions. This dynamic approach enables the creation of more interactive and customizable user interfaces.
4.
Which of the following does not belong to transitions?
Correct Answer
D. ViewSlider
Explanation
The ViewSlider is not a standard Android transition class. It is not included in the Android SDK and does not belong to the set of predefined transition classes. The other options (ViewSwitcher, ViewFlipper, and ViewAnimator) are all valid transition classes in Android that can be used to animate the transition between views.
5.
In nine patch image,corners are
Correct Answer
B. Not scalable
Explanation
In a nine patch image, the corners are not scalable. This means that the content within the corners of the image will remain fixed and cannot be stretched or resized when the image is scaled. The purpose of having non-scalable corners is to ensure that certain elements or designs within the image, such as borders or patterns, maintain their original proportions and appearance regardless of the image size.
6.
Fragment is not a part of activity
Correct Answer
B. False
Explanation
The given statement is "Fragment is not a part of activity" and the correct answer is False. This means that the statement is incorrect. In reality, a fragment is indeed a part of an activity in Android development. Fragments are modular sections of an activity that can be combined or reused in different activities. They allow for a more flexible and modular design of user interfaces. Hence, the correct answer is False, as fragments are indeed a part of an activity.
7.
Action bar can be associated to
Correct Answer
A. Only activities
Explanation
The action bar can be associated with only activities because it is a UI component that provides a consistent navigation and menu options for the user within an activity. Fragments, on the other hand, do not have their own action bar. Instead, they can contribute to the action bar of the activity they are attached to. Therefore, the correct answer is that the action bar can only be associated with activities.
8.
Rating bar can be resize
Correct Answer
B. No
Explanation
The given statement is "Rating bar can be resized". The correct answer is "No". This means that the rating bar cannot be resized.
9.
Select depreciated components from the list below
Correct Answer
A. Absolute Layout
Explanation
The correct answer is Absolute Layout. Absolute Layout is a component that has been deprecated in Android since API level 3. This means that it is no longer recommended for use in new applications as it may not be supported in future versions of Android. Developers are encouraged to use other layout components such as ConstraintLayout or LinearLayout instead.
10.
Which one of the following is not included in API level 8 or lesser?
Correct Answer
B. Fragment
Explanation
The correct answer is Fragment. Fragment was introduced in Android API level 11 (Honeycomb) and is not included in API level 8 or lesser. The other options - Spinner, List View, and Progress Bar - are all included in API level 8 or lesser.