Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/382.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 将网站转换为android应用程序_Java_Android - Fatal编程技术网

Java 将网站转换为android应用程序

Java 将网站转换为android应用程序,java,android,Java,Android,我已经使用Android Studio将我的网站转换成了一个应用程序。但是,每次应用程序打开时,网站都不会自动适应屏幕。我做错了什么?这需要处理填充物吗?“16dp” 只需去掉你在相对主义者身上设置的填充物。大概是这样的: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:lay

我已经使用Android Studio将我的网站转换成了一个应用程序。但是,每次应用程序打开时,网站都不会自动适应屏幕。我做错了什么?这需要处理填充物吗?“16dp”


只需去掉你在相对主义者身上设置的填充物。大概是这样的:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

</RelativeLayout>


希望这是您想要的。

是,如果您在根视图组中指定了它。填充表示视图/视图组中用作边距的空间量。更多信息:你有一个编码布局吗?你能告诉我你做了什么吗。这样我才能更好地理解您想要什么。?xml version=“1.0”encoding=“utf-8”?>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

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

</RelativeLayout>