Choose the best answer for each question. When answering the final exam questions you may provide a reason to justify your answer for partial credit. Your reason will not be considered if you choose the correct answer.
a. <intent> b. <intent-filter> c. <intent-layout> d. <intent-activity>
a. namespace:tools=http://schemas.android.com/tools b. namespace:tools="http://schemas.android.com/tools" c. xmlns:tools=http://schemas.android.com/tools d. xmlns:tools="http://schemas.android.com/tools"
a. app/main/src/main/res/values b. app/src/main/res/colors c. app/src/main/res/values d. app/src/res/values
<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:padding="50dp" android:orientation="vertical" tools:context=".MainActivity"> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hello" android:padding="50dp" android:textSize="30sp"/> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Hi" android:textSize="30sp" /> </LinearLayout>Which of these emulator screen does it produce?
a. | b. | c. | d. |
<string name="fname">Alice</string>in the strings.xml file and assigns it to n?
a. String n = (String) R.string.fname; b. String n = getResources( ).getString(R.string.fname); c. String n = getResources(R.string.fname); d. String n = getResources(R.strings.fname);
a. new Intent(this, ReceiveMessageActivity.class).startActivity( ); b. new Intent(this, ReceiveMessageActivity.class, startActivity( )); c. startActivity(new Intent(ReceiveMessageActivity.class)); d. startActivity(new Intent(this, ReceiveMessageActivity.class));
a. btn.setOnClickListener(new OnClickListener( ) { public void onClick(View view) { txt.setText(txt.getText( ).toUpperCase( )); } ); b. btn.setOnClickListener(new OnClickListener( ) { public void onClick(View view) { txt.setText(txt.getText( ).toString( ).toUpperCase( )); } }); c. btn.setOnClickListener(new View.OnClickListener( ) { public void onClick(View view) { txt.setText(txt.getText( ).toUpperCase( )); } }); d. btn.setOnClickListener(new View.OnClickListener( ) { public void onClick(View view) { txt.setText(txt.getText( ).toString( ).toUpperCase( )); } });