2012-03-13 56 views
2

我已經制定,而不是在web視圖加載它命名爲「石魚賽車」的情況下的應用程序ü想反正當應用程序加載頁面延胡索吧:) ,它會打開一個瀏覽器? 繼承人的編碼,如果u能幫助的Android的WebView問題

RMS/RES /佈局/ main.xml中

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

<TextView 
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    /> 

<WebView xmlns:android="http://schemas.android.com/apk/res/android" 
android:id="@+id/webview" 
android:layout_width="fill_parent" 
android:layout_height="fill_parent" 
/> 

</LinearLayout> 

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="XXXXXXX" 
android:versionCode="1" 
android:versionName="1.0" > 

<uses-sdk android:minSdkVersion="10" /> 
<uses-permission android:name="android.permission.INTERNET" /> 

<application 
    android:icon="@drawable/new_launcher" 
    android:label="@string/app_name" > 
    <activity 
     android:name=".RockfishMotorsportsActivity" 
     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> 
</manifest> 
+0

添加活動的源代碼 – FoamyGuy 2012-03-13 00:50:58

回答

0

我無法找到Android Market上的應用程序,但我假設你的WebView你有試圖去一個不同的頁面上的用戶行爲,在默認情況下將啓動瀏覽器。爲了使你的的WebView新的頁面加載,看看這個其他SO回答:

Android WebView click opens default browser

+0

感謝的人現在的工作 – SMOKE 2012-03-13 12:29:22