开发者

program won't run when WebView is inserted, using Beginning Android 2 by Mark Murphy, followed instrutions on page 141

For example (WebKit/Browser1), here is a simple layout with a WebView:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<WebView android:id="@+id/webkit"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
/>
</LinearLayout>

Do I create a class called browser1 or create a xlm file under layouts with the name Browser1, also is the WebKit direc开发者_开发知识库tory necessary?


Do I create a class called browser1

Your Activity can be named whatever you want.

or create a xlm file under layouts with the name Browser1

Your layout file can be named whatever you want.

also is the WebKit directory necessary?

It is necessary for that book, because there are three separate WebKit examples (Browser1, Browser2, Browser3), meaning that in traditional computer filesystems, you need a directory to put the three of them in one place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜