的Android全屏的webapp后端应用

问题描述:

我根据http://developer.android.com/resources/tutorials/views/hello-webview.html的Android全屏的webapp后端应用

虽然我做了什么是书面的,包括第5页,应用程序是不是全屏创建一个基于网页视图的应用程序。

当你在清单的时候,通过 给出网页一些更多的空间除去标题栏,用“NoTitleBar”的主题:

<activity android:name=".HelloGoogleMaps" 
android:label="@string/app_name" 
    android:theme="@android:style/Theme.NoTitleBar"> 

清单的完整代码是在这里:

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

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

    <uses-sdk android:minSdkVersion="8" /> 

    <application 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" > 
     <activity 
      android:name=".HelloWorldActivity" 
      android:label="@string/app_name" 
      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> 

main.xml中的文件是在这里:

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

我已经在模拟器(2.2)和真实设备(2.3)中测试了应用程序,项目平台是2.2。

结果这里介绍(真实设备看起来类似):

enter image description here

这有什么错我的应用程序时,为什么标题栏出现的,什么是正确的吧?

问候,

UPDATE

这个问题部分地复制这一个(右边栏): webview showing white bar on right side

这可以帮助你在OnCreate() - 方法:

requestWindowFeature(Window.FEATURE_NO_TITLE); 
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,WindowManager.LayoutParams.FLAG_FULLSCREEN); 
+1

requestWindowFeature(Window.FEATURE_NO_TITLE); - 我已经评论过它,因为它使应用程序崩溃。该应用程序现在全屏,谢谢。 – noober 2011-12-26 01:10:32

+0

哦,对不起,我没有测试这个片段,但如果它现在正常工作,我很满意。 :) – TheWhiteLlama 2011-12-26 01:20:07

+0

嗯...该应用程序是全屏幕,但左栏仍然存在。它会是什么?我猜,WebView组件是黑色的,因为HTML背景颜色设置为0,并且在任何其他浏览器(Chrome,FF,Chromium,Safari,Mobile Safari)中都看不到该栏。我不知道如何调试。在VS之后,Eclipse和Android看起来并不陌生和陌生。 – noober 2011-12-26 01:26:41