Which of the following is a Java call-back method invoked when a view is clicked?
A. OnClickListener
B. OnTapListener
C. OnClickDetector
D. Detector
正解:A
質問 2:
Consider the following AndroidManifest.xml file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mycube.test" android:versionCode="1" android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
<application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar" >
<activity android:name=".Menu" android:screenOrientation="portrait" android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<activity android:name=".Compute" android:screenOrientation="portrait" />
</manifest>
What is the syntax error of this file?
A. The <activity> tag for Activity ".Compute" should be contained inside <application> tag.
B. The INTERNET permission must be removed.
C. Tag uses-sdk must have attribute android:maxSdkVersion set.
D. the package name must be "com.mycube.test".
正解:D
質問 3:
Which of the following is incorrect about ProgressDialog?
A. ProgressDialog is able to apply a custom XML-defined layout by using the setContentView(...) method.
B. ProgressDialog can be freely configured to use a Drawable class to display as its progress bar.
C. ProgressDialog can be set as 2 types of style: STYLE_HORIZONTAL and STYLE_SPINNER.
D. ProgressDialog inherits from the AlertDialog class.
正解:A
質問 4:
Which of the following sets the entire Activity window as a WebView?
A. WebView webview = new WebView(this);setContentView(webview);
B. setContentView("http://www.androidatc.com");
C. setContentView(R.layout.webview);
D. WebView webview = new WebView(this);webview.setAsWindow;
正解:A
質問 5:
Which of the following is true about attribute android:windowSoftInputMode of the <activity> tag in file
AndroidManifest.xml?
A. It adjusts how the window should be launched.
B. It adjusts how the main window of the activity interacts with keyboard.
C. It adjusts the window orientation.
D. It specifies whether the window is in full screen or not.
正解:B
質問 6:
Javascript is enabled by default in a WebView.
A. False
B. True
正解:A