Unity3D游戏引擎实现在Android中打开WebView的实例

2019-12-10 20:01:52于海丽
  • android:layout_width="fill_parent"  android:layout_height="fill_parent" 
  • android:orientation="vertical" >   <WebView 
  • android:id="@+id/webView"  android:layout_width="fill_parent" 
  • android:layout_height="wrap_content"  android:layout_weight="1.0" 
  • />   <Button 
  • android:id="@+id/button"  android:text="关闭网页" 
  • android:layout_width="wrap_content"  android:layout_height="wrap_content" 
  • />   </LinearLayout> 

    最后是AndroidManifest.xml

     

     
    1. <?xml version="1.0" encoding="utf-8"?>   <manifest xmlns:android="http://www.easck.com/apk/res/android" 
    2. package="com.xys"  android:versionCode="1" 
    3. android:versionName="1.0" >   <uses-sdk android:minSdkVersion="10" />  
    4. <application  android:icon="@drawable/ic_launcher" 
    5. android:label="@string/app_name" >   <activity 
    6. android:name=".UnityTestActivity"  android:label="@string/app_name" >  
    7. <intent-filter>   <action android:name="android.intent.action.MAIN" />  
    8. <category android:name="android.intent.category.LAUNCHER" />   </intent-filter>  
    9. </activity>   <activity