Hi,
Please go through the AbsoluteLayout documentation:
http://code.google.com/android/reference/android/widget/AbsoluteLayout.LayoutParams.html
You can add the following lines to your code:
mContentView = new AbsoluteLayout(this);
mContentView.addView(iV, new AbsoluteLayout.LayoutParams(68, //width
68, //height
100, //left
150); //top
setContentView(mContentView);
Thanks,
Megha
On Mon, Apr 7, 2008 at 12:31 PM, pfife <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I need to display an ImageView object in code to allow me to
> dynamically reposition it. face_c is a gif file width and heightof 68
> pixels. Using AbsoluteLayout what code should be added below to place
> face_c at (100,150) to maintain its width and height of 68 pixels?
>
> Thanks,
> Pfife
>
> public void onCreate(Bundle icicle) {
> super.onCreate(icicle);
> ImageView iV = new ImageView(this);
> iV.setImageResource(R.drawable.face_c);
> setContentView(iV);
> }
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Android Challenge" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-challenge?hl=en
-~----------~----~----~----~------~----~------~--~---