2014-10-16 86 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"/>