2014-10-16 79 views

回答

0
requestWindowFeature(Window.FEATURE_NO_TITLE); 

在活动onCreate方法

+0

我在哪里可以找到setContentView? (是的,我是新手,不需要告诉我;)) – andreglud 2014-10-16 12:56:53

0

使用下面的代码的setContentView

setContentView(R.layout.yourlayout); 

之前。这个工作对我来说

<WebView 
android:id="@+id/webView" 
android:layout_width="match_parent" 
android:layout_height="match_parent"> 
</WebView> 

如果您正在使用WebView在另一个布局如LinearLayout不至布局给填充...

<LinearLayout 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:orientation="vertical"> 
    <WebView 
     android:id="@+id/webView" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent"> 
    </WebView> 
</LinearLayout> 

如果你想隐藏ActionBar太然后跳转到你清单文件和您的活动标记使用android:theme="@style/Theme.AppCompat.Light.NoActionBar"

<activity 
    android:name=".YourActivityName" 
    android:theme="@style/Theme.AppCompat.Light.NoActionBar"/>