0

私はAndroid開発に慣れていませんが、しばらく検索した後、AndroidウィンドウでWebビューを最大化するソリューションを取得できません(現在のテストでは12080 * 800)。物理デバイス (samsung 10.1) でも同じ問題が発生します。

https://dl.dropbox.com/s/d57nmlhbs8pu6k7/2013-06-11%20at%2010.18.15.png

<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"
    android:gravity="top"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context=".MainActivity" >

    <WebView
        android:id="@+id/webView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_alignParentTop="true"
        android:layout_margin="0dp"
        android:padding="0dp"
        android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />

</RelativeLayout>

と私のコード:

@Override
protected void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

//Remove title bar
this.requestWindowFeature(Window.FEATURE_NO_TITLE);

//Remove notification bar and set fullscreen
this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
setContentView(R.layout.activity_main);

// add the webview
WebView www = (WebView) findViewById(R.id.webView);
www.setWebViewClient(new WebViewClient());
www.getSettings().setJavaScriptEnabled(true);
www.getSettings().setDomStorageEnabled(true);
www.getSettings().setSavePassword(false);
www.getSettings().setSaveFormData(false);
www.getSettings().setUseWideViewPort(true);

// load html
www.loadUrl("http://192.168.1.8:3000/app/tgg4yme");

}

私もエディターを介してウィンドウを埋めようとしました...成功しませんでした

ありがとうございました

4

0 に答える 0