Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.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
Android layout Android设备屏幕大小问题_Android Layout - Fatal编程技术网

Android layout Android设备屏幕大小问题

Android layout Android设备屏幕大小问题,android-layout,Android Layout,在我的主屏幕中,我设置了一个图像作为背景,并在布局底部的背景图像上设置了三个图像按钮。它(三个图像按钮)在480x854屏幕设备中看起来很完美,但在240x320屏幕大小的设备中却不是。我使用的XML布局是: <?xml version="1.0" encoding="UTF-8"?> <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orien

在我的主屏幕中,我设置了一个图像作为背景,并在布局底部的背景图像上设置了三个图像按钮。它(三个图像按钮)在480x854屏幕设备中看起来很完美,但在240x320屏幕大小的设备中却不是。我使用的XML布局是:

<?xml version="1.0" encoding="UTF-8"?>
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:orientation="vertical"
             android:layout_width="fill_parent"
             android:layout_height="fill_parent"
             android:background="@drawable/inscreen">
        <ImageView android:id="@+id/clip"
                   android:layout_height="wrap_content"
                   android:layout_width="wrap_content"
                   android:layout_alignParentBottom="true"
                   android:layout_marginBottom="95dip"
                   android:layout_gravity="bottom|center"
                   android:src="@drawable/selector"/>
        <ImageView android:id="@+id/catagoryvid"
                   android:layout_height="wrap_content"
                   android:layout_width="wrap_content"
                   android:layout_alignParentBottom="true"
                   android:layout_marginBottom="55dip"
                   android:layout_gravity="bottom|center"
                   android:src="@drawable/selector1"/>
        <ImageView android:id="@+id/search"
                   android:layout_height="wrap_content"
                   android:layout_width="wrap_content"
                   android:layout_alignParentBottom="true"
                   android:layout_marginBottom="15dip"
                   android:layout_gravity="bottom|center"
                   android:src="@drawable/selector2"/>
    </FrameLayout>

有什么帮助吗


谢谢。

您应该使用相对布局来处理此类问题,在这种情况下,无论屏幕大小如何,您都可以相对地放置控件。

添加您的XML布局详细信息以获得更多了解。您尝试的内容可以粘贴到此处,以便我可以在这方面为您提供帮助(如果有)