【发布时间】:2010-11-21 04:07:50
【问题描述】:
我在绝对面板中有一个图像设置。我正在尝试通过代码设置它的位置。但我没有看到任何适用的方法/属性来设置它的位置。
这是我的布局。
<?xml version="1.0" encoding="utf-8"?>
<AbsoluteLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
>
<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/marker" android:src="@drawable/marker" android:layout_y="106dp" android:layout_x="290dp"></ImageView>
</AbsoluteLayout>
这是我设置其位置的代码
marker = (ImageView)findViewById(R.id.marker);
marker.//Can't find a method or property
【问题讨论】: