Android设备ScreenSize问题

时间:2010-11-18 12:25:35

标签: android-layout

在我的主屏幕中,我将一个图像设置为背景,并在布局底部的背景图像上设置三个图像按钮。它(三个图像按钮)在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>

任何帮助?

感谢。

1 个答案:

答案 0 :(得分:1)

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

相关问题