Sematec Android Quiz

10 Questions | Attempts: 423
Share

SettingsSettingsSettings
Sematec Android Quiz - Quiz

.


Questions and Answers
  • 1. 

    What method you should override to use Android’s menu which is placed on the action bar?

    • A.

      A. onCreateOptionsMenu( )

    • B.

      B. onCreateMenu( )

    • C.

      C. onMenuCreated( )

    • D.

      D. onMenuCreated( )

    Correct Answer
    A. A. onCreateOptionsMenu( )
  • 2. 

    Which of the following is NOT a valid usage for Intents?

    • A.

      A. Activate and Activity.

    • B.

      B. Activate a Service.

    • C.

      C. Activate a Broadcast receiver.

    • D.

      D. Activate a SQLite DB Connection.

    Correct Answer
    D. D. Activate a SQLite DB Connection.
  • 3. 

    What is the name of the class used by Intent to store additional information?

    • A.

      A. Extra

    • B.

      B. Parcelable

    • C.

      C. Bundle

    • D.

      D. DataStore

    Correct Answer
    C. C. Bundle
  • 4. 

    Which method should you use to start a sub-activity?

    • A.

      A. startActivity(Intent intent)

    • B.

      B. startActivityForResult(Intent intent)

    • C.

      C. startService(Intent intent)

    • D.

      D. startSubActivity(Intent intent)

    Correct Answer
    B. B. startActivityForResult(Intent intent)
  • 5. 

    Which of the following attributes is used to set an activity screen to landscape orientation?

    • A.

      A. screenorientation = landscape

    • B.

      B. screenOrientation=”landscape”

    • C.

      C. android:ScreenOrientation=“landscape”

    • D.

      D. android:screenOrientation=”landscape”

    Correct Answer
    D. D. android:screenOrientation=”landscape”
  • 6. 

    Consider the following code: Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setData(android.net.Uri.parse("http://www.androidatc.com")); startActivity(intent); Which of the following is correct about the code above? 

    • A.

      A. It sends a result to a new Activity in a Bundle.

    • B.

      B. It will not compile without adding the INTERNET permission the Manifest file.

    • C.

      C. It starts any activity in the application that has a WebView in its layout.

    • D.

      D. When it is executed, the system starts an intent resolution process to start the right Activity.

    Correct Answer
    D. D. When it is executed, the system starts an intent resolution process to start the right Activity.
  • 7. 

    Which Which of the following does NOT correctly describe interface android.widget.Adapter?

    • A.

      A. It is an object that acts as a bridge between a View and underlying data for that view.

    • B.

      B. It provides access to the data items.

    • C.

      C. It provides access to deprecated ListView methods.

    • D.

      D. It is responsible for making a View for each item in the data set.

    Correct Answer
    C. C. It provides access to deprecated ListView methods.
  • 8. 

    Which of the following is incorrect about intents?

    • A.

      A. They can be used to start an Activity.

    • B.

      B. They can be used to start a service.

    • C.

      C. They can be used to start database insertion.

    • D.

      D. They can be used to start a dialog-themed activity.

    Correct Answer
    C. C. They can be used to start database insertion.
  • 9. 

    Which of the following lines of code is used to pass a value to the next activity?

    • A.

      A. Intent i = new Intent(this,newActivity); i. addExtra(“test”); startActivity(i);

    • B.

      B. Intent i = new Intent(this,newActivity); i. putValue(“test”); startActivity(i);

    • C.

      C. Intent i = new Intent(this,newActivity); i. putValue(“value1”,“test”); startActivity(i);

    • D.

      D. Intent i = new Intent(this,newActivity); i. putExtra(“value1”,“test”); startActivity(i);

    Correct Answer
    D. D. Intent i = new Intent(this,newActivity); i. putExtra(“value1”,“test”); startActivity(i);
  • 10. 

    When the user clicks on an action item in the action bar, which of the following Activity methods does the system call?  

    • A.

      A. onOptionsItemSelected()

    • B.

      B. onOptionsItemClicked()

    • C.

      C. onActionButtonSelected()

    • D.

      D. onActionBarItemSelected()

    Correct Answer
    A. A. onOptionsItemSelected()

Quiz Review Timeline +

Our quizzes are rigorously reviewed, monitored and continuously updated by our expert board to maintain accuracy, relevance, and timeliness.

  • Current Version
  • Mar 20, 2022
    Quiz Edited by
    ProProfs Editorial Team
  • Oct 04, 2017
    Quiz Created by
    Asgari.sematec
Back to Top Back to top
Advertisement
×

Wait!
Here's an interesting quiz for you.

We have other quizzes matching your interest.