Android - definindo X, Y da imagem programaticamente
Tenho duas ImageViews dentro de um AbsoluteLayou
<AbsoluteLayout android:id="@+id/AbsoluteLayout01"
android:layout_width="fill_parent" android:background="@drawable/whitebackground"
android:layout_height="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android">
<ImageView android:id="@+id/floorPlanBackgroundImage"
android:src="@drawable/ic_tab_lights_gray"
android:scaleType="center"
android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>
<ImageView android:id="@+id/fpLight"
android:src="@drawable/ic_tab_lights_gray"
android:scaleType="center" android:layout_x="50px" android:layout_y="50px"
android:layout_width="wrap_content" android:layout_height="wrap_content"></ImageView>
</AbsoluteLayout>
the floorPlanBackgroundImage é definido dinamicamente a partir de uma imagem com tamanho de 800 x 600. O pode rolar em torno del
Minha segunda imagem, fpLight representa uma luz em uma sala. É uma pequena imagem de 20x20. O que eu preciso fazer é alterar as propriedades layout_x & layout_y no código, mas não vejo uma maneira de definir isso no ImageView.
Eu esperava algo assim ...
fpLight.setLayoutX ("55px");
Há algum jeito