开发者

Android Device ScreenSize Problem

开发者 https://www.devze.com 2023-01-26 05:48 出处:网络
in my Home Screen i have set one image as background, And set Three Image Button on That Background Image at Bottom of layout. it(Three Image Button) seems perfect in 480x854 screen Device but not in

in my Home Screen i have set one image as background, And set Three Image Button on That Background Image at Bottom of layout. it(Three Image Button) seems perfect in 480x854 screen Device but not in 240x320 Screen size of device. My XML Layout That I use is:

<?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"
  开发者_如何学JAVA                 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>

Any help?

Thanks.


You should use relative layout for handling such type of problem, In which you can put the controls relatively regardless of screen size.

0

精彩评论

暂无评论...
验证码 换一张
取 消