Possible Duplicate:
OpenGL and Android relative layout
Hy, I was wondering how to code this xml to code
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@raw/gi"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="64px"
android:layout_height="64px"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/b1" />
<ImageView
android:id="@+id/imageView2"
android:layout_width="64px"
android:layout_height="64px"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/imageView1"
android:src="@drawable/b2" />
<ImageView
android:id="@+id/imageView3"
android:layout_width="64px"
android:layout_height="64px"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/imageView2"
android:src="@drawable/b3" />
</RelativeLayout>
as I need it to be placed exactly like that. all I got so far is
gi = new RelativeLayout(this);
gi.setBackgroundResource(R.raw.gi);
img1= new ImageView(this);
img1.setImageResource(R.drawable.b1);
img1.setLayoutParams();
img2= new ImageView(this);
img2.setImageResource(R.drawable.b2);
img3= new ImageView(this);
img3.setImageResource(R.drawable.b3);
gi.addView(img1,64,64);
gi.addView(img2,64,64);
gi.addView(img3,64,64);
I'm obviously having some trouble with alignparents which I can't find in the documentation. Also are these pixels, dpi's or something else in the addview