我正在寻找一种方法来设置我的imageView坐标。我想把其他图像放在坐标上。设置坐标图像查看
ImageView img1 = (ImageView) findViewById(R.id.imageView1);
img1.setAdjustViewBounds(true);
我的布局是这样的:
<RelativeLayout android:id="@+id/rellayneuuuu"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:id="@+id/imageView1" android:scaleType="centerCrop"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:src="@drawable/image1" />
<ImageView android:id="@+id/imageView2" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:src="@drawable/icon"
android:layout_marginTop="40px" android:layout_marginLeft="40px" />
</RelativeLayout>
感谢
你是什么意思的坐标(我猜在屏幕上的位置)?你在使用哪种布局? – Sephy 2011-05-04 07:36:04
是的,我的意思是屏幕上的位置。它是一个可滚动的图像。在相对布局。 – bebe 2011-05-04 07:43:39
你的图像比X轴和Y轴上的屏幕大吗? – Sephy 2011-05-04 07:52:40