【发布时间】:2016-03-29 11:54:49
【问题描述】:
如何在不同的屏幕尺寸下拥有相同的 imageview 绝对位置?
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent" android:layout_height="match_parent" android:background="#000000">
<ImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:id="@+id/road"
android:src="@drawable/road" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/car"
android:src="@drawable/car"
android:layout_marginLeft="112dp"
android:layout_marginTop="168dp" />
</RelativeLayout>
不同屏幕尺寸的汽车位置不一样。
【问题讨论】:
标签: android imageview position screen absolute