Chapter 1-Android system and its development process-Exercise
The file format used for the App interface layout is ( ).
B. XML
The database that App can directly connect to is ( )
A. SQLite
If the mobile phone cannot install and debug the App, what may be the cause ( ).
B. In lock screen state
What is not a smartphone operating system is ( ).
D. Windows 10
Which of the following devices cannot run Android system ( ).
B. ipad tablet computer
The App-specific development kit provided by Android is named ( ).
B.SDK
The method for printing debug level logs is named ( )
C. Log.d
The main programming language used in Android App development is ( ).
B.Java
The following ( ) attribute represents the control number of the TextView label.
D.id
You can connect your mobile phone and computer through ( ).
A. USB interface
Android Studio uses the Maven tool to complete the build operation of the App project. ( )
B. Wrong
Android is a mobile open source operating system based on Java. ( )
B. Wrong
An App project can contain multiple App modules. ( )
A. Yes
Running App refers to running a module, not a project. ( )
A. Yes
The management tool used by Android Studio to create emulators is called Device Manager. ( )
A. Yes
The image resources of the App project are placed in the layout directory. ( )
B. Wrong
Android Studio evolved from Eclipse. ( )
B. Wrong
The two major technical routes for App development include native development and hybrid development. ( )
A. Yes
The Android system is launched by SUN. ( )
B. Wrong
Calling the startActivity method in Java code can jump to a new App page. ( )
A. Yes
The API number corresponding to Android 11 is 30. ( )
A. Yes
Kotlin language can also be used for App development. ( )
A. Yes
In addition to running on the mobile phone, the App can also run on the AVD of the computer. ( )
A. Yes
Android Studio only runs on 64-bit operating systems. ( )
A. Yes
In addition to turning on the developer options, you also need to turn on the USB debugging switch on the phone before you can debug the app on the phone. ( )
A. Yes
App is a server-side program. ( )
B. Wrong
The compilation configuration file of the App project is named local.properties. ( )
B. Wrong
The first Android phone was made by Nokia. ( )
B. Wrong
App can be run directly on the computer. ( )
B. Wrong
Android Studio supports Java 8 by default. ( )
A. Yes
Chapter 2 - Simple Controls - Exercise
In Java code, the default font size unit of the setTextSize method is ( ).
D.sp
The attribute name of GridLayout that specifies the number of grid rows is ( ).
B.rowCount
Image button ImageButton is derived from ( ).
D.ImageView
In the button control, the name of the property that puts the picture to the right of the text is ( ).
A. drawableRight
When the image view adopts the zoom type ( ), the image may be stretched and deformed.
D.FIT_XY
Android's control classes are all derived from ViewGroup. ( )
B. Wrong
Android's color values are jointly defined by alpha transparency and RGB primary colors. ( )
A. Yes
The resource file name that stores string definitions in the res/values directory is colors. ( )
B. Wrong
The scroll view ScrollView defaults to subordinate layouts arranged horizontally. ( )
B. Wrong
Linear layout LinearLayout defaults to lower-level controls arranged in the horizontal direction. ( )
A. Yes
dp refers to device-independent display units. ( )
A. Yes
In a relative layout, if the reference object of the subordinate view is not set, the subordinate view will be displayed in the center of the layout by default. ( )
B. Wrong
English on button controls displays uppercase letters by default. ( )
A. Yes
By default, the button control will trigger a long press event after being pressed for more than 50 milliseconds. ( )
B. Wrong
When linear layout uses the attribute layout_weight to set the size weight of subordinate controls, set the width and height of subordinate controls to 0px. ( )
A. Yes
Chapter 3-Activity-Exercise
Jump from page A to page B, and then return from page B to page A. At this time, page A will execute the ( ) method first.
C.
onRestart
The stack is a ( ) data structure.
D. First in, last out
Calling the ( ) method on the current page will return to the previous page.
A.finish
( ) is not an attribute owned by the meta-data tag.
C.id
The data structure used to store messages inside the Bundle is ( ).
B.Map
Close the existing page. The life cycle methods of the existing page are onPause→onStop→onDestory. ( )
A. Yes
After setting the startup flag Intent.FLAG_ACTIVITY_SINGLE_TOP, when the top of the stack is an activity instance to be jumped, the instance on the top of the stack will be reused. ( )
A. Yes
Implicit Intent directly specifies the source activity and target activity, which is an exact match. ( )
B. Wrong
Long press the application icon on the desktop, and the shortcut menu of the application will pop up (if configured). ( )
A. Yes
The Action method of the Intent object is used to specify the action behavior of the intent. ( )
B. Wrong
Add the action tag to the activity node of AndroidManifest.xml to set metadata information for the activity. ()
B. Wrong
Open a new page, and the life cycle methods of the new page are onCreate→onResume→onStart. ( )
B. Wrong
When the active page is in the ready state, the user is allowed to enter text on the interface. ( )
B. Wrong
The previous page should process the data returned by the next page in the onActiviyResult method. ( )
A. Yes
Calling the startActivity method can also obtain the intent data returned by the next page. ( )
B. Wrong
Chapter 4 - Intermediate Controls - Exercise
If you want the edit box EditText to enter a numeric password, set the inputType attribute to ( ).
D.numberPassword
To select only one button in a group of buttons, the ( ) control should be used.
D.RadioButton
Which time units can be seen on the date selection dialog box ( ).
C. day of the week
The ( ) attribute of the status list graphic is used to describe whether the graphic list is pressed.
A.state_pressed
If you want to add processing after the text in the edit box changes, you should add code in the ( ) method.
A.afterTextChanged
Controls derived from CompoundButton include CheckBox, RadioButton and Switch. ( )
A. Yes
The length attribute of EditText can specify the maximum length of text allowed to be entered. ( )
B. Wrong
The time dialog box will display the current hour, minute, and second. ( )
B. Wrong
Shape graphics can describe the definition of a rounded rectangle. ( )
A. Yes
The input method soft keyboard is managed by the system service INPUT_METHOD_MANAGER. ( )
B. Wrong
The first time you click on the edit box, its click event will be triggered. ( )
B. Wrong
By default, the internal controls of RadioGroup are arranged horizontally. ( )
B. Wrong
The extension of the graphics description file is xml. ( )
A.Yes
The reminder dialog box AlertDialog supports setting 3 buttons at the same time. ( )
A.Yes
The subordinate node width of the shape graphic shape describes the width and height dimensions of the shape graphic. ( )
B. Wrong
Chapter 5 - Data Storage - Exercise
The () method of Bitmap Factory BitmapFactory supports obtaining image data.
A.decodeImage
If you know the memory card path of a picture file, you can call the ( ) method to display it on the image view.
A.setImageURI
( ) is not a persistent storage method.
C.Global variables
What database operations does the DDL language include ( ).
C. Clear the form
Calling the () method will return the Cursor object of the result set.
A.rawQuery
App can read and write files in private space without any authorization. ( )
A. Yes
Shared parameters can only store string type data. ( )
B. Wrong
The modification of database records is completed by the modify command. ( )
B. Wrong
Starting from Android 7.0, the system prohibits apps from accessing public storage space by default. ( )
A. Yes
In order to ensure that there is only one Application instance while the App is running, it can be implemented in singleton mode. ( )
A. Yes
SQLiteHelper is a SQLite database manager provided by Android. ( )
B. Wrong
Application's onTerminate method is called when the App terminates. ( )
B. Wrong
The database that Android can directly operate is called MySQL. ( )
B. Wrong
SQLite can directly read and write Boolean type data. ( )
B. Wrong
The storage structure used by SharedPreferences is the key-value pair method. ( )
A. Yes
Chapter 6 - Content Sharing - Exercise
Manifest.permission.READ_CONTACTS indicates the permission to read phone numbers. ( )
B. Wrong
Content Resolver ContentResolver is a tool for client App to operate client data. ( )
B. Wrong
The tag name of the content provider declared in AndroidManifest.xml is contentprovider. ( )
B. Wrong
As long as the insert method of ContentResolver is called once, a piece of contact data can be written to the address book. ( )
B. Wrong
MediaStore.Images.Media.DATA saves the path of the image file in the media library. ( )
A. Yes
ContentProvider is an intermediate interface and does not directly save data. ( )
A. Yes
Call the getContentResolver method in the activity code to obtain an instance of the content resolver. ( )
A. Yes
Content Observer ContentObserver can obtain new data in real time. ( )
A. Yes
The data returned by the getUriForFile method of FileProvider is of type ( ).
D.Uri
Which of the following is not a component of the content component? ( )
A.FileProvider
App needs to apply for ( ) permission to read text messages.
A.READ_SMS
content://mms is the content path of ( ).
C.MMS
The file extension of the Android App installation package is ( ).
B.APK
Chapter 7 - Advanced Controls - Exercises
Spinner is a multiple-select drop-down box control. ( )
A. Yes
In the XML file, if there are other horizontal controls behind the ListView, set the height of the ListView to 0px and the weight to 1 to ensure that the list view expands to the remaining page area. ( )
B. Wrong
Grid views can specify both the number of rows and columns. ( )
B. Wrong
The method for setting the current page in ViewPager is setCurrentItem. ( )
A.Yes
The list view only supports the click event of the list item, but does not support the long press event of the list item. ( )
B. Wrong
Simple adapters can only display plain text lists. ( )
B. Wrong
Fragment has two registration methods, namely XML registration and code registration. ( )
A.Yes
When adopting dynamic registration method, fragments can only be used normally with page turning view. ( )
B. Wrong
Introducing the page turning tab bar PagerTabStrip, which can display the page title above the page turning view. ( )
A.Yes
If you want to pop up the Spinner's list dialog box in the middle of the page, set the spinnerMode property to dropdown. ( )
B. Wrong
Drop-down boxes cannot be used ( ).
C. Page turning adapter
The data adapter derived from BaseAdapter must supplement the processing logic of each control in the () method.
D.getView
In a list view, if you want to prevent the controls in the list from seizing the focus of the list item, you should set the focus preemption mode of the internal view to ( )
A.blocksDescendants
In grid view, if you want the remaining space of each row to be evenly distributed to each grid in that row, you should set the stretch mode to ( ).
D.spacingWidthUniform
If you want the page turning view to trigger some action after scrolling, you should override the () method of the page turning adapter.
D.onPageSelected
Chapter 8-Broadcast Component Broadcast-Exercise
Activities can communicate not only one-to-one, but also one-to-many. ( )
A. Yes
To register a broadcast statically, you need to add a receiver tag named receiver to AndroidManifest.xml. ( )
A. Yes
Intent represents a delayed intention, and the component it points to will not be activated immediately. ( )
B. Wrong
The default screen orientation of mobile phones is lanscape. ( )
B. Wrong
After turning on picture-in-picture mode, the App interface can be reduced to a square on the screen. ( )
A. Yes
Standard broadcasts are unordered, and it is possible that receivers registered later will receive the broadcast before receivers registered earlier. ( )
A. Yes
Set the priority through the setPriority method. The lower the priority, the earlier the receiver receives the ordered broadcast. ( )
B. Wrong
Ordinary applications can listen to system broadcasts through static registration. ( )
B. Wrong
The setRepeating method of the alarm clock manager AlarmManager ensures that broadcasts can be sent on time. ( )
B. Wrong
Rotate the phone so that the screen changes from portrait to landscape. The app will reload the entire page by default (destroying the original page first and then creating a new page). ( )
A. Yes
Calling the () method inside the receiver will interrupt the ordered broadcast.
A.abortBroadcast
android.permission.VIBRATE expresses ( ) permission.
D.Vibrator
Network type ( ) indicates the mobile phone’s data connection (including 2G/3G/4G/5G).
C.TYPE_WIMAX
Network status ( ) indicates that it is connected.
B.CONNECTED
( ) Display change exemptions that do not belong to the configuration of the configChanges attribute.
C. fontSize