您可能會在Webview上方顯示佈局,如Linear,Relative ..等等。從佈局中刪除所有的屬性,如:
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
試試這個:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<WebView
android:id="@+id/webview"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
希望這有助於。
所以你要在全屏的WebView? –
是的,當我查看網站時,我正在查看的內容與實際的手機之間有一個體面的差距,如果這有意義嗎? – Paldan