0

我想用 Eclipse 在 android 上设计一个旋转半轮菜单。我有一个完整的轮子图像,我想把它放在屏幕底部。我必须将全轮的中点放在屏幕底部以获得半轮菜单。我已经在 xml 上尝试过该代码

在此处输入图像描述

它在模拟器上的模拟并不让我满意。因为车轮图像位于屏幕中央。我希望它放置在我的旋转半轮菜单应用程序的底部。我也知道我可以设置它android:layout_marginTop="600dp",但我想在使用android操作系统的手机上提供其他屏幕尺寸的兼容性。

4

1 回答 1

0

您可以RelativeLayout在该图像之外使用并在图像中设置属性android:layout_alignParentBottom="true"

像这样

<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" >

    <ImageView
        android:id="@+id/imageView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:src="@drawable/ic_launcher" />

</RelativeLayout>
于 2013-03-14T12:08:51.720 回答