Android入门练习简单浏览器出现问题

移动开发 码拜 9年前 (2015-05-10) 861次浏览 0个评论

看看哪里不对
源码:
1.SimpleBrowser.java

Android入门练习简单浏览器出现问题
Android入门练习简单浏览器出现问题
2.simplebrowser.xml

<?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:orientation=”horizontal”
        android:weightSum=”10″
        android:layout_width=”match_parent”
        android:layout_height=”wrap_content”>
        <EditText
            android:layout_width=”match_parent”
            android:layout_weight=”2″
            android:layout_height=”wrap_content”
            android:id=”@+id/etURL”/>
        <Button
            android:text=”GO”
            android:id=”@+id/bGO”
            android:layout_width=”match_parent”
            android:layout_weight=”8″
            android:layout_height=”wrap_content”/>
    </LinearLayout>
<LinearLayout
    android:orientation=”horizontal”
    android:weightSum=”8″
    android:layout_width=”match_parent”
    android:layout_height=”wrap_content”>
    <Button android:text=”Go Back”
     android:id=”@+id/bBack”
     android:layout_weight=”2″
     android:layout_width=”match_parent”
     android:layout_height=”wrap_content”/>
    <Button android:text=”Forward”
     android:id=”@+id/bForward”
     android:layout_weight=”2″
     android:layout_width=”match_parent”
     android:layout_height=”wrap_content”/>
    <Button android:text=”Refresh”
     android:id=”@+id/bRefresh”
     android:layout_weight=”2″
     android:layout_width=”match_parent”
     android:layout_height=”wrap_content”/>
    <Button android:text=”Clear”
     android:id=”@+id/bHistory”
     android:layout_weight=”2″
     android:layout_width=”match_parent”
     android:layout_height=”wrap_content”/>   
</LinearLayout>

<WebView
    android:id=”@+id/wvBrowser”
    android:layout_width=”match_parent”
    android:layout_height=”match_parent” />
</LinearLayout>

多谢

40分
onClickListener 这个应该是 android.view.View.OnClickListener  你可能引用错了包名 
引用 1 楼 birdsaction 的回复:

onClickListener 这个应该是 android.view.View.OnClickListener  你可能引用错了包名 

谢谢我去试试


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Android入门练习简单浏览器出现问题
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!