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

它在仿真器上的模拟并不能让我满意。因为轮子图像在屏幕的中心。我想把它放在我的旋转半轮菜单应用程序的底部。我也知道我可以用android:layout_marginTop="600dp"来设置,但我想在使用安卓操作系统的手机上提供与其他屏幕尺寸的兼容性。
发布于 2013-03-14 20:08:52
您可以在该图像外部使用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>https://stackoverflow.com/questions/15408794
复制相似问题