Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

____1. Which of the following statements is true ? a. Extensible Markup Language (XML) is a natural way to express GUIs. b. XML is human-

____1. Which of the following statements is true?

a. Extensible Markup Language (XML) is a natural way to express GUIs.

b. XML is human- and computer-readable text and, in the context of Android, helps you specify the layouts and components to use, as well as their attributes, such as size, position, color, text size, margins and padding.

c.You use XML files to store app resources, such as strings, numbers and colors.

d. All of the above are true.

____2. Which attribute do we use to specify the margin above a View?

A) margin

B) android:marginTop

C) android:layout_marginTop

D) android:layout_margin

____3. Which class enables the user to enter text?

A) TextField

B) EditText

C) EditView

D) Text

____4. What is the correct definition of an item inside a style (assuming that the color abc is correctly defined in colors.xml)?

A)

B) @color/abc

C) abc

D) color/abc

____5. Which class is not a subclass of Button?

A) CheckBox

B) Switch

C) RadioButton

D) EditText

____6. What character should be used to separate multiple values for an EditTexts android:inputType?

A. comma

B. #

C. @

D. |

____7. The int parameter of the setContentView( int ) method represents:

[A] a count.

[B] a random integer.

[C] a resource.

[C] 0 or 1.

____8. A(n) _____ is used for simple layout arrangements that require elements to be displayed along either a horizontal or vertical line.

LinearLayout

TableLayout

( c) RelativeLayout

____9. Using a RelativeLayout, to specify that a View matches the left edge of another View, we use which of the following attributes?

[A] android:layout_alignLeft

[B] android:layout_leftOf

[C] android:layout_rightOf

[D] android:layout_align

____10. A color has been defined in colors.xml using #33FD42. How do you use it?

[A] @color/myColor

[B] @color/33FD42

[C] color/myColor

[D] color/33FD42

____11. All the Activities that compose an Android app must be declared in what file?

A. strings.xml

B. AndroidManifest.xml

C. activities.xml

D. build.gradle

____12. The name of the directory where we should place the icon file for the app is:

A) drawable.

B) raw.

C) mipmap.

D) values.

____13. Using a RelativeLayout, to specify that a View matches the left edge of another View, we use which of the following attributes?

[A] android:layout_alignLeft

[B] android:layout_leftOf

[C] android:layout_rightOf

[D] android:layout_align

____14. What is the only method of the View.OnClickListener interface?

[A] click

[B] onClickView

[C] clicked

[D] onClick

____15. The onCheckedChange method of the RadioGroup.OnCheckedChangeListener interface has the following API:

void onCheckedChanged( RadioGroup group, int a )

What does group represent?

[A] The View for this Activity

[B] The radio button that was clicked

[C] The RadioGroup to which the radio button that was clicked belongs

[D] This Activity

____16. A _____ is a specialized control that is optimized for displaying long lists of items.

ListView

Scroller

MasterList

____17. The onItemClick() method from the AdapterView.OnItemClickListener interface can tell you what information?

A. The ViewAdapter where the user clicked

B. The index position of the selected view in the adapter

C. The row ID of the selected item

D. All the above.

____18. The ArrayAdapter constructor has this API:

ArrayAdapter( Context c, int i, List objects)

What does the parameter i represent?

[A] It is always 0

[B] A random integer

[C] The number of elements in the List objects

[D] A resource id

____19. The ___ callback method is most often used for saving a persistent state the Activity might be editing.

onStart()

onResume()

onPause()

onCreate()

____20. For the user to begin interacting with the application Activity, the ___ callback method is called.

onStart()

onResume()

onPause()

onCreate()

____21. Following is the API of the getint method of SharedPreferences.Editor:

int getInt( String a, int b)

What does b represent?

[A] A key for which getInt returns the associated value

[B] A value for which getInt returns the associated key

[C] A default value that may (or may not) be returned by getInt

[D] A default key value

____22. Which class do we use to send some output to Logcat?

[A] Logcat

[B] System

[C] Print

[D] Log

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2018 Dublin Ireland September 10 14 2018 Proceedings Part 1 Lnai 11051

Authors: Michele Berlingerio ,Francesco Bonchi ,Thomas Gartner ,Neil Hurley ,Georgiana Ifrim

1st Edition

3030109240, 978-3030109240

More Books

Students also viewed these Databases questions

Question

What is dividend payout ratio ?

Answered: 1 week ago

Question

Explain the factors affecting dividend policy in detail.

Answered: 1 week ago