Android engineers will answer 20 questions and Android 20 questions

Source: Internet
Author: User

Android engineers will answer 20 questions and Android 20 questions

I. multiple choice questions (7 questions in total, 5 points per question)

1. Which of the following statements about using AIDL to call a remote service method is false?

A. The interface name corresponding to aidl cannot be the same as that of aidl

B. The content of the aidl file is similar to the java code.

C. Create a Service and return the actual value in the onBind (Intent intent) method of the Service.
Now the aidl interface object

D. The access permission modifier cannot be added before the method of the interface corresponding to aidl


2. Description of the trigger condition for the onServiceConnected () method of the ServiceConnection Interface
Which of the following statements is true?

A. After the bindService () method is successfully executed

B. The bindService () method is successfully executed. At the same time, the onBind () method returns a non-empty IBinder object.

C. After the onCreate () method and onBind () method of Service are successfully executed

After the onCreate () and onStartCommand () Methods of D. Service are successfully started


3. Which of the following situations need to move the process to the foreground?

A. The process is running an Activity that interacts with the user. Its onResume () method is called.

B. The process has a running BroadcastReceiver whose onReceive () method is being executed.

C. The process has a Service, and a callback function (onCreate (),
The onStart (), or onDestroy () contains the code being executed.

D. All options are correct.


4. Which of the following statements about broadcast is true ().

A. the broadcast receiver can only be registered in the configuration file

B. The broadcast receiver cannot be deregistered after registration

C. The broadcast receiver can only receive custom broadcast messages.

D. The broadcast receiver can be registered and deregistered separately in the Activity.


5. Which of the following statements about the prompt duration when Toast is used is true ().

A. The display duration is set to only 2 by default.

B. You can customize the display duration.

C. When the input is 30 seconds, the prompt will be displayed for 30 seconds.

D. The program will throw an exception when the custom display duration is set to 30 for example.

6. In a layout file, set an EditText. Which of the following settings can be used for the input box
Identify the effect of the prompt content ().

A. android: capitalize

B. android: hint

C. android: singleLine

D. android: text


7. Which of the following statements about AlertDialog is false ().

A. show () method only displays the dialog box

B. Both the create () and show () Methods of AlertDialog. Builder return the AlertDialog object.

C. AlertDialog cannot directly use the new keyword to build an object, but must use its internal class Builder

D. create () method to create and display the dialog box


2. Multiple answer questions (12 questions in total, 5 points per question)


1. Which of the following data types can be passed when Intent transmits data?

A. Serializable

B. CharSequence

C. Parcelable

D. Bundle


2. Which of the following methods do I need to override when using Menu in android?

A. onCreateOptionsMenu ()

B. onCreateMenu ()

C. onOptionsItemSelected ()

D. onItemSelected ()

3. When SQLiteOpenHelper is used in android, a database can be generated and
Which of the following methods can be used to manage database versions?

A. getWriteableDatabase ()

B. getReadableDatabase ()

C. getDatabase ()

D. getAbleDatabase ()

4. Which of the following statements about the service life cycle onCreate () and onStart () in android are true?

A. The onCreate () and onStart () methods are called successively at the first startup.

B. When it is started for the first time, only the onCreate () method is called.

C. If the service has been started, the onCreate () and onStart () methods will be called successively.

D. If the service has been started, only the onStart () method is executed, not the onCreate () method.

5. Which of the following statements about android NDK is true?

A. NDK is A collection of tools

B. NDK provides a stable and functional API header file statement.

C. The development method of "Java + C" has finally become an official supported development method.

D. NDK will be the start of C development on the Android platform

6. Which of the following statements about the Activity lifecycle is true?

A. When setting the Activity's android: screenOrientation = "portrait" attribute, switch the screen
The onConfigurationChanged method is executed instead of calling the life cycle in the vertical direction.

B. The android: configChanges attribute of the Activity is not set. When the screen is switched in the vertical and horizontal directions
Call the onCreate () method

C. When you start a launchMode Activity that is set to singletask again
The onNewIntent () method is triggered.

D. the user is operating on an Activity. If other applications require memory, the system will use
The Activity of the user's current operation is forcibly disabled.

7. In which of the following circumstances will the Froce Close dialog box pop up?

A. The Main thread performs time-consuming operations during application running.

B. When the application runs, an OutOfMemoryError is thrown.

C. RuntimeException thrown during application running

D. When the application is running, user operations are too frequent.

8. Which of the following objects are provided by the Android system?

A. Message

B. Thread

C. AsyncTask

D. Logoff

9. Which of the following statements about the relationship between IntentService and Service is false?

A. IntentService is A subclass of Service.

B. IntentService starts a new thread to execute the task at runtime.

C. Different startup Methods

D. No difference

10. Which of the following statements about the definition of style and theme in Android is true?

A. Duplicate attribute settings can be reduced.

B. style can be used on Activity.

C. The Theme class can be inherited.

D. The textColor attribute is defined in the style of a TextView, And the TextView itself is also set
TextColor attribute, the TextView itself has a higher priority.

11. In a ListView, the row layout is displayed in multiple forms. For example, some rows only have
ImageView, while some other rows only have TextView. Which methods do I need to rewrite?

A. getCount ()

B. getItemId ()

C. getItemViewType ()

D. getViewTypeCount ()

12. Which of the following components are supported in row layout when SimpleAdapter is used as the ListView adapter?

A. TextView

B. ProgressBar

C. CompoundButton

D. ImageView

This question was manually entered by the landlord from an examination website because the webmaster encrypted the webpage. Answers + questions can be resolved inAndroid engineer capability evaluationView.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.