AND-801

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

D

The values of which of the following classes cannot be mapped in a Bundle object? A. Parcelable B. String C. ArrayList D. Context

C

To add a new Activity to your application, you need to perform the following steps: A. Create a Java class that extends View, set a layout, and add an Activity tag in AndroidManifest.xml. B. Create layout resource only. C. Create a Java class that extends Activity, add an Activity tag in AndroidManifest.xml, and create a layout for the activity. D. Add an Activity tag to AndroidManifest.xml, and add ACTIVITY permission.

C

Which of the following AsyncTask methods is NOT executed on the UI thread? A. onPreExecute() B. onPostExecute() C. publishProgress() D. onProgressUpdate()

A

Which of the following WebView methods allows you to manually load custom HTML markup? A. loadData B. loadHTML C. loadCustomData D. loadCustomHTML

ABD

Which of the following a Notification object must contain? (Choose three) A. A small icon B. A detail text. C. A notification sound D. A title

B

Which of the following add a click listener to items in a listView? A. onClickListener B. onItemClickListener C. onItemClicked D. onListItemClickListener

BC

Which of the following applies a context menu on a ListView? (Choose two) A. ListView lv = getListView();lv.registerForContextMenu() B. ListView lv= getListView();registerForContextMenu(lv); C. ListView lv = (ListView) findViewById(R.id.list_view_id);registerForContextMenu(lv) D. getListView().setConextMenuEnabled(true)

D

Which of the following is a call-back method that inflates an options menu from file res/menu/menu.xml? A. onOptionsItemSelected B. onCreate C. Primitive onCreateMenu D. onCreateOptionsMenu

D

Which of the following is a correct Android Manifest statement? A. <uses-permission android:name ="android.Internet"/> B. <uses-permission android:name ="android.Internet"></uses-permission> C. <uses-permission android:name ="android.permission.Internet"> D. <uses-permission android:name ="android.permission.Internet"/>

B

Consider the following : <?xml version="1.0" encoding="utf-8"?> <menu xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@+id/create_new" android:title="@string/create_new" /> <item android:id="@+id/open" android:title="@string/open" /> </menu> public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.create_new: newFile(); return true default: return super.onOptionsItemSelected(item); Upon clicking on one of the menu items, the application did not behave as intended. Which of the following might be the cause of this problem? A. The developer did not set onClickListener on the menu item. B. The developer did not include a case that corresponds to the menu item in method onOptionsItemSelected. C. The developer should create onOptionsItemSelected method for each menu item. D. The developer should add the item to the menu resource file.

C

How to enable JavaScript in WebView? A. myWebView.setJavaScriptEnabled(true); B. myWebView.getJavaScriptSettings.setEnabled(true); C. myWebView.getSettings().setJavaScriptEnabled(true); D. Java script is always enabled in WebView

D

If your application is throwing exception android.content.ActivityNotFoundException, how to fix it? A. Create a new activity Java sub-class B. Rename your activity C. ISO Create the activity layout D. Add the activity to the AndroidManifest

A

An AsyncTask can be cancelled anytime from any thread. A. True B. False

B

Consider the following AndroidManifest.xml file. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.androidatc " android:versionCode="1 android:versionName="1.0" > <uses-sdk android:minSdkVersion="12" android:targetSdkVersion="17" /> <application android:name="MyApp " android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <activity android:name="com.androidatc.MainActivity" android:label="@string/app_name" android:screenOrientation="portrait" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <uses-permission android:name="android.permission.INTERNET" /> </application> </manifest> Which of the following is correct? A. The application will run as intended. B. The application will not compile. C. The application will crash on fetching data from the internet. D. The app will run in Landscape orientation.

C

Consider the following AndroidManifest.xml file: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mkyong.android" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="10" /> <uses-permission android:name="android.permission.WebActivity " /> <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" > <activity android:name=".WebViewActivity" android:theme="@android:style/Theme.NoTitleBar" > <intent-filter > <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest> Supposing the application connects to the internet at startup, which of the following is true? A. The application throws an exception indicating it does not have permission to access the URL. B. The application will work as intended. C. The application won't compile. D. The application throws a java.lang.SecurityException.

C

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 INTERNET permission must be removed. B. Tag uses-sdk must have attribute android:maxSdkVersion set. C. the package name must be "com.mycube.test". D. The &lt;activity> tag for Activity ".Compute" should be contained inside &lt;application> tag.

B

Consider the following code : @Override public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("Menu"); AdapterContextMenuInfo cmi = (AdapterContextMenuInfo) menuInfo; menu.add(1, cmi.position, 0, "Open file"); menu.add(2, cmi.position, 0, "Save file");} Which of the following best explains the code above? A. The code inflates an xml file into menu items. B. The code creates menu items for context menu programmatically. C. The code assign actions to menu items. D. The code Opens a menu resource file, modifies it, and saves the changes.

A

Consider the following code snippet: String[] result_columns = new String[]{KEY_ID, COL1, COL2}; Cursor allRows = myDatabase.query(true, DATABASE_TABLE, result_columns, null,null,null,null,null,null); Which of the following prints out the values of COL1 column correctly if the result is not empty? A. if (cursor.moveToFirst()) {do {System.out.println(cursor.getString(1));}while (cursor.moveToNext()); } B. do {System.out.println(cursor.getString(0));}while (cursor.moveToNext()); C. if (cursor.moveToFirst()) {do {System.out.println(cursor.getString(0));}while (cursor.moveToNext()); } D. if (cursor != null) {do {System.out.println(cursor.getString(1));}while (!cursor.isNull()); }

D

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. It sends a result to a new Activity in a Bundle. B. It will not compile without adding the INTERNET permission the Manifest file. C. It starts any activity in the application that has a WebView in its layout. D. When it is executed, the system starts an intent resolution process to start the right Activity.

C

Consider the following the code : public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.game_menu, menu); return true; Which of the following is true about the code above? A. The code is auto generated and should not be edited. B. This method handles clicks and assign actions to menu items. C. This function inflates an XML file in the res/menu folder into menu items. D. This method inflates an XML file in the res/layout folder into layout.

C

During an Activity life-cycle, what is the first callback method invoked by the system? A. onStop() B. onStart() C. onCreate() D. onRestore()

C

In which Activity life-cycle method you should do all of your normal static set up such as: creating views and bind data to lists? A. onResume() B. onStart() C. onCreate() D. onPause()

B

Javascript is enabled by default in a WebView. A. True B. False

B

Method onDraw() of class android.view.View has the following signature: A. public void onDraw(Color) B. public void onDraw(Canvas) C. public boolean onDraw(Canvas) D. public Canvas onDraw()

B

The DalvikVM core libraries are a subset of which of the following? A. Java ME B. Java SE C. Java EE D. JAX-WS

A

To create a customized Adapter for a compound list item layout , you should: A. Extend class android.widget.Adapter or any of its descendants then override method getView() B. Extend class android.widget.ListView or any of its descendants, then override method getView() C. Extend class android.widget.AbsAdapter or any of its descendants, then override method getView() D. Extend class android.widget.Adapter or any of its descendants, then override method getAdapterView()

B

What Activity method you use to retrieve a reference to an Android view by using the id attribute of a resource XML? A. findViewByReference(int id) B. findViewById(int id) C. retrieveResourceById(int id) D. findViewById(String id)

C

What Eclipse plug-in is required to develop Android application? A. J2EE B. Android Software Development Kit C. Android Development Tools D. Web Development Tools

A

What are the main two types of thread in Android? A. Main thread and worker threads. B. Main thread and UI thread. C. Activities and services. D. Main thread and background process.

B

What does the Android project folder "res/" contain? A. Java Activity classes B. Resource files C. Java source code D. Libraries

B

What does the following code achieve? Intent intent = new Intent(FirstActivity.this, SecondActivity.class); startActivityForResult(intent); A. Starts a browser activity B. Starts a sub-activity C. Starts an activity service D. Sends results to another activity

D

What does the following line of code achieve? Intent intent = new Intent(FirstActivity.this, SecondActivity.class ); A. Creates a hidden Intent. B. Creates an implicit Intent. C. Create an explicit Intent. D. Starts an activity.

B

What does the following line of code do? Toast toast = Toast.makeText(this,"Android ATC", Toast.LENGTH_LONG); toast.setGravity(Gravity.TOP|Gravity.RIGH, 0, 0); A. The toast will have it UI components place on the top-right corner. B. The toast will appear on the top-right corner. C. The toast will show the text message on top-right corner of the toast box. D. The toast will appear at the center of the screen at position (0,0), but aligned to the top- right corner.

D

What does the src folder contain? A. Image and icon files. B. XML resource files. C. The application manifest file. D. Java source code files.

D

What does this code do? Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent.setData(android.net.Uri.parse("http://www.androidatc.com")); startActivity(intent); A. Starts a sub-activity. B. Starts a service. C. Sends results to another activity. D. Starts an activity using an implicit intent.

B

What is a correct statement about an XML layout file? A. A layout PNG image file. B. A file used to draw the content of an Activity. C. A file that contains all application permission information. D. A file that contains a single activity widget.

A

What is not true about the AndroidManifest.xml file? A. It declares the views used within the application. B. It declares user permissions the application requires. C. It declares application components. D. It declares hardware and software features used within the application.

C

What is the name of the class used by Intent to store additional information? A. Extra B. Parcelable C. Bundle D. DataStore

D

What is the name of the folder that contains the R.java file? A. src B. res C. bin D. gen

C

What is the parent class of all Activity widgets? A. ViewGroup B. Layout C. View D. Widget

A

What method you should override to use Android menu system? A. onCreateOptionsMenu() B. onCreateMenu() C. onMenuCreated() D. onMenuCreated()

B

What two methods you have to override when implementing Android context menus? A. onCreateOptionsMenu, onCreateContextMenu B. onCreateContextMenu, onContextItemSelected C. onCreateOptionsMenu, onOptionsItemSelected D. onCreateOptionsMenu, onContextItemSelected

C

What two methods you have to override when implementing Android option menus? A. onCreateOptionsMenu, onCreateContextMenu B. onCreateContextMenu, onContextItemSelected C. onCreateOptionsMenu, onOptionsItemSelected D. onCreateOptionsMenu, onContextItemSelected

B

When creating a file using android.content.Context.openFileOutput("test.txt", 0), where is the file created? A. /data/app/&lt;package name>/files B. /data/data/&lt;package name>/files C. /system/app/&lt;package name>/files D. Application /system/data/&lt;package name>/files

C

When including a text file in your application to read from as a resource, what is the recommended location of such file? A. res/anim B. res/files C. res/raw D. res/values

A

When is the intent resolution process triggered? A. When the system receives an implicit intent to start an activity. B. When an explicit intent starts a service. C. When the system receives an explicit intent to start an activity. D. When the application calls method startAcitivyIntentResolution.

C

When publishing an update to your application to the market, the following must be taken into consideration: A. The package name must be the same, but the .apk may be signed with a different private key. B. The package name does not have to be the same and the .apk can be signed with a different private key. C. The package name must be the same and the .apk must be signed with the same private key. D. The package name does not have to be the same, but the .apk must be signed with the same private key.

A

When using an implicit intent, what process does the system use to know what to do with it? A. Intent resolution B. Intent declaration C. Intent overloading D. Intent transition

A

Which Consider the following code: Intent i = new Intent(this, MainActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(i); What best explains the code above? A. The activity being launched is already running in the current task, then instead of launching a new instance of that activity, all of the other activities on top of it will be closed and this Intent will be delivered to the (now on top) old activity as a new Intent. B. Any existing task that would be associated with the activity to be cleared before the activity is started. C. A new Activity will be launched and it will be on the top of the stack. D. A new activity will be launched but will be in full-screen mode.

C

Which UI does the following code builds? <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android=http://schemas.android.com/apk/res/android android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal" > <TextView android:id="@+id/textView1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Name:" /> <EditText android:id="@+id/editText1" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:ems="10" /> </LinearLayout> <Button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="Post" /> </LinearLayout> A. An edit text to the left of a text view and a button beneath it B. An edit text to the right of a text view and a button to the right of the text view C. An edit text to the right of a text view and a button beneath them D. A text view, an edit text beneath it and the button beneath the edit text

C

Which Which of the following does NOT correctly describe interface android.widget.Adapter? A. It is an object that acts as a bridge between a View and underlying data for that view. B. It provides access to the data items. C. It provides access to deprecated ListView methods. D. It is responsible for making a View for each item in the data set.

B

Which Which of the following is true about method startActivity? A. It starts a new activity and destroys the previous one. B. It starts a new activity and sends the previous one to the background. C. It starts a new activity and pauses the previous one. D. It starts a new activity in a paused mode.

D

Which configuration file holds the permission to use the internet? A. Layout file B. Property file C. Java source file D. Manifest file

D

Which file specifies the minimum required Android SDK version your application supports? A. main.xml B. R.java C. strings.xml D. AndroidManifest.xml

D

Which is the correct explanation of ListView? A. It is necessary to use ListView as a set with ListActivity. B. You cannot use a ListView when there is no information to be displayed. C. When displaying a list of Strings using an ArrayAdapter class in ListView, you must save the value in an ArrayList. D. ListView has a function to display a list of uniquely defined Views other than TextView.

D

Which manifest file permission you should add to allow your application to read the devices address book? A. READ_ADDRESS_DATA B. READ_PHONE_STATE C. READ_PHONE_CONTACTS D. READ_CONTACTS

B

Which method is used to close an activity? A. Destroy() B. Finish() C. Stop() D. Close()

B

Which method should you use to start a sub-activity? A. startActivity(Intent intent) B. startActivityForResult(Intent intent) C. startService(Intent intent) D. startSubActivity(Intent intent)

B

Which of following is incorrect about the Toast class? A. You cannot set a custom layout for a Toast. B. You cannot set a custom layout for a Toast There is no need to close or hide a Toast, since it closes automatically. C. There is no need to close or hide a Toast, since it closes automatically. D. A Toast is displayed for only one of the following periods: Toast.LENGHT_SHORT or Toast.LENGTH_LONG.

A

Which of the following Activity life-cycle methods is called once the activity is no longer visible? A. onStop B. onPause C. onDestroy D. onHide

A

Which of the following Activity life-cycle methods is invoked when a dialog is shown? A. onPause() B. onCreate() C. onStop() D. onDestroy()

D

Which of the following Activity methods is invoked when the user clicks on an options menu item? A. onItemClicked B. onItemSelected C. onOptionsItemClicked D. onOptionsItemSelected

B

Which of the following Android View sub-classes uses the WebKit rendering engine to display web pages? A. PageView B. WebView C. MapView D. HttpClient

AC

Which of the following applies to the onDraw() method of class View? (Choose two) A. It must be overridden if a customize drawing of a view is required. B. It takes two parameters: a Canvas and a View. C. It takes one parameter of type Canvas. D. It uses the Canvas parameter to draw the border of the activity that contains it.

AD

Which of the following are layout-related methods called by the framework on views, and you can override them when customizing a view? (Choose two) A. onMeasure() B. onDraw() C. onKeyUp() D. onSizeChanged()

A

Which of the following are primary pieces of information that are required to define in an implicit Intent? A. An action to be performed and data to operate on. B. An action to be performed and a category for additional information. C. A Bundle for extra data. D. A category of additional information and data to operate on.

D

Which of the following attributes is used to set an activity screen to landscape orientation? A. screenorientation = landscape B. screenOrientation="landscape" C. android:ScreenOrientation="landscape" D. android:screenOrientation="landscape"

B

Which of the following best explains the Android context menus? A. It is a popup menu displays a list of items in a vertical list that's anchored to the view that invoked the menu. B. It is a floating menu that appears when the user performs a long-click on an element. It provides actions that affect the selected content or context frame. C. It is the primary collection of menu items for an activity. It's where you should place actions that have a global impact on the app, such as "Search," "Compose email," and "Settings". D. It is a sub-menu of an options menu item.

A

Which of the following best explains the Android option menus? A. It is a popup menu that displays a list of items in a vertical list anchored to the view that invoked the menu. B. It is a floating menu that appears when the user performs a long-click on an element. It provides actions that affect the selected content or context frame. C. It is the primary collection of menu items for an activity where you should place actions that have a global impact on the app, such as "Search," "Compose email," and "Settings." D. It is a type of List Activity with predefined headers and footers for special commands.

B

Which of the following classes is used by Intent to transfer data between different android components? A. Extras B. Bundle C. Parcelable D. PendingIntent

A

Which of the following classes should be extended to create a custom view? A. View B. ViewGroup C. Context D. Activity

D

Which of the following information is not included in the Manifest file? A. The activities contained in the application. B. The permissions required by the application. C. The application's minimum SDK version required. D. The handset model compatible with your application.

C

Which of the following is NOT a correct constructer for ArrayAdapter? A. ArrayAdapter(Context context) B. ArrayAdapter (Context context, int recourse) C. ArayAdpater (Context context , int resource, int textViewResourceId) D. ArrayAdapter (Context context , int resource, List&lt;T> items)

D

Which of the following is NOT a valid usage for Intents? A. Activate and Activity. B. Activate a Service. C. Activate a Broadcast receiver. D. Activate a SQLite DB Connection.

AC

Which of the following is NOT true about SQLiteOperHelper class? (Choose two) A. It has two abstract methods: onCreate() and onUpgrade(). B. It is used to perform database querying. C. It manages database creation and updates. D. It manages database versions using ContentProvider.

B

Which of the following is NOT true about a content provider? A. It manages access to structured data. B. It cannot be used from inside an Activity. C. It facilitates access to Android's SQLite databases. D. To access data in it, method getContentResolver() of the application's Context is used.

C

Which of the following is NOT true about class AsyncTask? A. It must be used by sub-classing it. B. It must be created on the UI thread. C. Its sub-class override at least two methods: doInBackground, onPostExecute. D. It uses three generic types

C

Which of the following is NOT true about class DefaultHttpClient? A. It supports HTTPS B. It supports streaming uploads and downloads C. It is only supported on Android versions 2.2 and older D. It is Andriod's default implementation of an HTTP client

B

Which of the following is NOT true about class ListActivity? A. An activity that displays a list of items by binding to a data set. B. Its layout must be set by calling method setContentView inside onCreate. C. It contains a ListView object that can be bound to different data sets. Binding, screen layout, and row layout are discussed in the following sections. D. A data source that can be bound in a ListActivity can be an array or Cursor holding query results.

C

Which of the following is NOT true about method getWindow() of class Dialog do? A. It retrieves the current window for the activity. B. It can be used to access parts of the Windows API. C. It displays the dialog on the screen. D. It returns null if the activity is not visual.

D

Which of the following is NOT true about onMeasure() method of class View? A. It measures the view and its contents to determine the measured width and height. B. It is invoked by measure(). C. The When overriding this method, a developer must call setMeasuredDimension(). D. It takes three parameters: the height, width, and the depth of the view.

B

Which of the following is NOT true about the MenuItem interface? A. The MenuItem instance will be returned by the Menu class add(...) method. B. MenuItem can decide the Intent issued when clicking menu components. C. MenuItem can display either an icon or text. D. MenuItem can set a checkbox.

D

Which of the following is a Java call-back method invoked when a view is clicked? A. Detector B. OnTapListener C. OnClickDetector D. OnClickListener

D

Which of the following is a NOT valid form of notification invoked by the NotificationManager? A. A Flashing LED. B. A persistent icon in the status bar. C. A sound played. D. A SMS sent.

CD

Which of the following is a rule that developers must always follow when writing multi- threaded Android applications? (Choose two) A. A worker thread must not be created from inside the UI thread. B. Each UI thread must not create more than one worker thread. C. The UI thread must never be blocked. D. The Android UI must not be accessed from outside the UI thread.

BC

Which of the following is a valid sequence of invokes to Activity lifecycle methods? (Choose two) A. onCreate > onStart > onResume > onPause> onStop> onCreate B. onCreate > onStart > onResume > onPause> onStop>onRestart C. onCreate > onStart > onResume > onPause> onStop>onDestroy D. onCreate > onStart > onResume > onPause> onStop>onResume

C

Which of the following is correct about XML layout files? A. In order to display a Ul defined in the XML layout file "main.xml", call the setContentView method of the Activity with the parameter string main.xml". B. There is no distinction between implementation of the layout definition by code, or by XML layout file. C. In an Eclipse project using the ADT plug-in, the XML layout file is found in the /res/layout directory. D. Layout information written in the XML layout file will be converted into code by the Android platform when the screen is displayed.

A

Which of the following is correct about file access in the Android system? A. Generally, files are handled as dedicated resources per each application. B. Files created by an application can be directly accessed by any application. C. The content of file created by application cannot be accessed by any other application. D. You can only access a file from within an Activity.

C

Which of the following is incorrect about ProgressDialog? A. ProgressDialog inherits from the AlertDialog class. B. ProgressDialog can be set as 2 types of style: STYLE_HORIZONTAL and STYLE_SPINNER. C. ProgressDialog is able to apply a custom XML-defined layout by using the setContentView(...) method. D. ProgressDialog can be freely configured to use a Drawable class to display as its progress bar.

C

Which of the following is incorrect about intents? A. They can be used to start an Activity. B. They can be used to start a service. C. They can be used to start database insertion. D. They can be used to start a dialog-themed activity.

D

Which of the following is incorrect about the LogCat tool? A. A LogCat view is available as part of the ADT plugin of Eclipse. B. You can create a log in your application using Log.v(String, String). C. Each log message has a tag. D. Only one of your application can create log entries, and it should be component class (Activity, Service,...etc).

D

Which of the following is not a ContentProvider provided natively by Android? A. The contacts list B. The telephone log C. The bookmarks D. The application list

B

Which of the following is not a valid Android resource file name? A. mylayout.xml B. myLayout.xml C. my_layout.xml D. mylayout1.xml

D

Which of the following is not an Activity lifecycle call-back method? A. onStart B. onCreate C. onPause D. onBackPressed

C

Which of the following is not an Android component (i.e. a point from which the system can enter your application)? A. Service B. Activity C. Layout D. Content Provider

C

Which of the following is not included in the Android application framework? A. WindowManager B. NotificationManager C. DialerManager D. PackageManager

C

Which of the following is not true about <activity> tag in AndroidManifest file? A. Declares an activity that implements part of the application's visual user interface. B. Contained in &lt;application> tag. C. Declares a single hardware or software feature that is used by the application. D. Has an attribute that specifies the name of the Activity sub-class that implements the activity.

B

Which of the following is not true about using a WebView in your application? A. You can retrieve WebSettings with getSettings(), then enable/disable JavaScript. B. You need to add permission "android.permission.ACCESS_NETWORK_STATE". C. You use loadURL to load a webpage. D. You use loadData to load HTML.

A

Which of the following is required to allow the Android Developer Tools to interact with your view? A. Provide a constructor that takes a Context and an AttributeSet object as parameters. B. Provide a constructor that takes a Context object as parameter. C. Extend class View. D. Override method onDraw() of class View.

C

Which of the following is the base class of all UI components? A. ListView B. Layout C. View D. ViewGroup

A

Which of the following is the correct way to add access permission to your application? A. Add a &lt;uses-permission> tag as a child tag of the &lt;manifest> tag in AndroidManifest.xml. B. Add a &lt;add-permission> tag as a child tag of the &lt;manifest> tag in AndroidManifest.xml. C. Add a &lt;uses-permission> tag as a child tag of the &lt;application> tag in AndroidManifest.xml. D. add a &lt;permission> tag as a child tag of the &lt;application> tag in AndroidManifest.xml.

B

Which of the following is true about attribute android:windowSoftInputMode of the <activity> tag in file AndroidManifest.xml? A. It specifies whether the window is in full screen or not. B. It adjusts how the main window of the activity interacts with keyboard. C. It adjusts how the window should be launched. D. It adjusts the window orientation.

AC

Which of the following is true about implicit intents? (Choose two) A. They do not have a component specified. B. They have components specified to run an exact class. C. They must include information that allows Android system to choose the best component to run. D. They must contain extra information saved in a Bundle object.

A

Which of the following is true about object arrayAdapter declared in the code below? String[] items = {Item 1,Item 2,Item 3}; ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items); listView.setAdapter(arrayAdapter); A. It creates a TextView for each String in array items B. It creates Buttons for each String in array items C. It creates four views for listView D. It replaces the layout of the activity with three consecutive TextView items

AC

Which of the following is true about the Dialog class? (Choose two) A. You can add a custom layout to a dialog using setContentView(). B. A dialog has a life-cycle independent of the Activity. C. A dialog is displayed on the screen using method show(). D. It does not have a method to access the activity that owns it.

AC

Which of the following is true about this code snippet? (Choose two) Intent intent = new Intent(Intent.ACTION_DIAL,Uri.parse(tel:555-1234)); startActivity(intent); A. This is an explicit intent that start the system's dialer. B. The system will not dial the number without adding permission CALL_PHONE. C. The system will perform an intent resolution to start the proper activity. D. The code will not compile.

D

Which of the following lines of code is used to pass a value to the next activity? A. Intent i = new Intent(this,newActivity); B. addExtra("test");startActivity(i); C. Intent i = new Intent(this,newActivity); D. putValue("test");startActivity(i); E. Intent i = new Intent(this,newActivity); F. putValue("value1","test");startActivity(i); G. Intent i = new Intent(this,newActivity); H. putExtra("value1","test");startActivity(i);

D

Which of the following lines of code starts activity Activity2 from a current activity Activity1? A. Intent intent = new Intent(this,new Activity2());startActivity(intent); B. Intent intent = new Intent(new Activity2());startActivity(intent); C. Intent intent = new Intent (Activity1.class,Activity2.class);startActivity(intent); D. Intent intent = new Intent(this,Activity2.class);startActivity(intent);

A

Which of the following lines of codes adds zoom controls to a WebView? A. webView.getSettings().setBuiltInZoomControls(true); B. webView.getSettings().setZoomControls(true); C. webView.getZoomSettings().setControls(CONTROLS.enabled); D. Zoom controls are included by default in WebViews

C

Which of the following makes a ListView Clickable? A. setClickable(true) B. setVisibility(View.Visible) C. setEnabled(true) D. setItemsEnabled(true)

B

Which of the following methods is called in an Activity when another activity gets into the foreground? A. onStop() B. onPause() C. onDestroy() D. onExit()

C

Which of the following methods updates a ListView when an element is added to the data set? A. notify() B. notifyAll() C. notifyDataSetChanged() D. notifyDataSetInvalidate()

C

Which of the following sets the entire Activity window as a WebView? A. WebView webview = new WebView(this);webview.setAsWindow; B. setContentView(R.layout.webview); C. WebView webview = new WebView(this);setContentView(webview); D. setContentView("http://www.androidatc.com");

D

Which of the following statements about DDMS is incorrect? A. You can display a list of currently running threads and select one to check its stack trace. B. You can use it to acquire screenshots of a terminal. C. You can forcibly execute garbage collection and check the present heap usage status. D. You can do simulations of network zone speed and bandwidth limitations.

D

Which of the following statements is correct about SQLite? A. It is an object database. B. It is client-server format. C. It is possible to create and access a database by using SQLOpenHelper. D. It can be accessed by other applications through ContentProvider.

C

Which of the following tools creates certificates for signing Android applications? A. adb B. logcat C. keytool D. certgen

B

Which of the following tools dumps system log messages including stack traces when the device or emulator throws an error? A. DDMS B. Logcat C. Console D. ADB

C

Which of the following you cannot achieve by creating your own View sub-classes? A. Create a completely new customized View type. B. Combine a group of View components into a new single component. C. Specify when to destroy an activity and all its views. D. Override the way that an existing component is displayed on the screen.

D

Which of these files contains text values that you can use in your application? A. AndroidManifest.xml B. res/Text.xml C. res/layout/Main.xml D. res/values/strings.xml

C

Which of these is NOT recommended in the Android Developer's Guide as a method of creating an individual View? A. Create it by extending the android.view.View class B. Create it by extending already existing View classes such as Button or TextView C. Create it by copying the source of an already existing View class such as Button or TextView D. Create it by combining multiple Views

A

Which of these is not defined as a process state? A. Non-visible B. A Visible C. Foreground D. Background

D

Which of these is the correct explanation regarding the following methods? (1)android.content.Context.sendBroadcast (2)android.content.Context.startActivity A. Both methods are defined by overloading. B. Both methods throw an exception. C. Both methods are asynchronous. D. Both methods are able to broadcast an Intent.

A

Which of these is the correct function of Traceview? A. Displays a graphical task execution log. B. Displays graphically a memory acquisition and release log. C. Displays graphically the call stack. D. Displays graphically the Ul state hierarchy.

D

Which of these is the incorrect explanation of the Android SDK and AVD Manager? A. They are provided from version 1.6 of the SDK. Up to Version 1.5, there was an AVD Manager but it lacked SDK management functions. B. You can create and startup AVD, and on startup you can delete user data up to that point. C. The "android" command can be used if "&lt;SDK install folder>/tools" is added to the command path. D. The development tools that can be downloaded from Android SDK and AVD Manager are SDK Android platform, NDK-platform, emulator images, and USB drivers for handsets. 0

D

Which of these is the incorrect method for an Application to save local data? A. Extend PreferencesActivity and save in an XML file. B. Save as a file in the local file system. C. Save in the database using SQLite. D. Save in the hash table file using the Dictionary class.

C

Which package of the following does not have classes needed for Android network connections? A. java.net B. org.apache.http C. android.location D. android.net

B

You can create a custom view by extending class Activity. A. True B. False

C

You can create a custom view by extending class: A. android.widget.View B. android.widget.LinearLayout C. android.view.View D. android.content.Context


संबंधित स्टडी सेट्स

Chapter 4: The periodic table and bonding

View Set

LearnSmart Chapter 17: Understanding Accounting and Financial Info

View Set

HLTH 231 Chapter 8 quiz questions

View Set