Free AND-401 Exam Braindumps (page: 24)

Page 24 of 58

Which of the following sets the entire Activity window as a WebView?

  1. WebView webview = new WebView(this);
    webview.setAsWindow;
  2. setContentView(R.layout.webview);
  3. WebView webview = new WebView(this);
    setContentView(webview);
  4. setContentView(“http://www.androidatc.com”);

Answer(s): 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?

  1. The code is auto generated and should not be edited
  2. This method handles clicks and assign actions to menu items
  3. This function inflates an XML file in the res/menu folder into menu items
  4. This method inflates an XML file in the res/layout folder into layout.

Answer(s): 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?

  1. The application throws an exception indicating it does not have permission to access the URL
  2. The application will work as intended
  3. The application won’t compile
  4. The application throws a java.lang.SecurityException

Answer(s): A

Explanation:

The program will compile, but then it will not be able to access the internet, as it does not have usespermission=” android.permission.INTERNET”



Which of the following is not true about using a WebView in your application?

  1. You can retrieve WebSettings with getSettings(), then enable/disable JavaScript
  2. You need to add permission “android.permission.ACCESS_NETWORK_STATE”
  3. You use loadURL to load a webpage
  4. You use loadData to load HTML

Answer(s): B

Explanation:

In order for your Activity to access the Internet and load web pages in a WebView, you must add the INTERNET permissions to your Android Manifest file:
<uses-permission android:name="android.permission.INTERNET" />


Reference:

http://developer.android.com/reference/android/webkit/WebView.html



Page 24 of 58



Post your Comments and Discuss Android AND-401 exam with other Community members:

PJ commented on January 12, 2025
very helpful
Anonymous
upvote

sam commented on January 12, 2025
helpful questions also in other forums
Anonymous
upvote

Ramesh commented on January 11, 2025
Good question
UNITED ARAB EMIRATES
upvote

SW commented on January 11, 2025
Preparing for exam
CANADA
upvote

scaramouche commented on January 11, 2025
Is this dump still valid? I'm taking it on Feb 2025
UNITED STATES
upvote

SK SHAKIL AHMED commented on January 11, 2025
Nice to be learnt
Anonymous
upvote

Jamal commented on January 11, 2025
Wonderful site and very helpful content. It was useful and helped me pass.
Anonymous
upvote

brad pit commented on January 11, 2025
good nowedge and prop guidance
Anonymous
upvote

Alex commented on January 11, 2025
Great material
UNITED KINGDOM
upvote

Andrei commented on January 11, 2025
Very useful
Anonymous
upvote

Amar commented on January 11, 2025
preparing for AI specialist
Anonymous
upvote

Hima commented on January 11, 2025
Good Practice
Anonymous
upvote

Suvarna commented on January 10, 2025
Helpful question
Anonymous
upvote

Anir commented on January 10, 2025
all good so far
Anonymous
upvote

Shyam Decosta commented on January 10, 2025
Good ones to start for preparation.
Anonymous
upvote

Tshego commented on January 10, 2025
Good explanations
SOUTH AFRICA
upvote

Umesh commented on January 10, 2025
Good ones to start for preparation.
Anonymous
upvote

SURPRISE commented on January 10, 2025
THEY ARE HELPING A LTO.
Anonymous
upvote

Rahul commented on January 10, 2025
Is it updated Q&A, and has anyone recently cleared the exam with this dump?
Anonymous
upvote

Christian commented on January 09, 2025
Very interesting
UNITED STATES
upvote

Anonymous commented on January 09, 2025
helpful dumps
Anonymous
upvote

JJ commented on January 09, 2025
Can anyone confirm if these questions are relevant to the actual N10-009 exam?
UNITED STATES
upvote

Jose35 commented on January 09, 2025
Yes looking for the update version or is it part of these questions/?
EUROPEAN UNION
upvote

V commented on January 09, 2025
Question 82 - Answer should be B, not D.
Anonymous
upvote

Albert Bijabibola commented on January 09, 2025
Very helpful
Anonymous
upvote

Denis commented on January 09, 2025
Okay so far
Anonymous
upvote

Elmo commented on January 09, 2025
Question 4, IMO Questionmark on building B should be a WAP? Devices all look wireless to me.
NETHERLANDS
upvote

Anonymous commented on January 09, 2025
Testing my Snowflake knowledge
INDIA
upvote

Anonymous commented on January 09, 2025
preparing for exam
INDIA
upvote

STR commented on January 09, 2025
Good questions
Anonymous
upvote

Chanti commented on January 09, 2025
Good content ??
UNITED STATES
upvote

Pinky commented on January 09, 2025
These are very helpful for me.
UNITED STATES
upvote

Pinky commented on January 09, 2025
Thankyou for the dumps
UNITED STATES
upvote

CHESI commented on January 09, 2025
relevant questions.
UNITED STATES
upvote