Thanks for the reply currently I have
ImageView myImageView = new ImageView(this);
myImageView.setImageResource(R.id.image);
this.addContentView(myImageView, new LayoutParams(15, 15));
How can I set the position for this particular view.
On Aug 16, 10:50 am, Kostya Vasilyev <[email protected]> wrote:
> Nikhil,
>
> The default position of child views with RelativeLayout is indeed at <0,0>.
>
> You need to do something to position the child view.
>
> Use RelativeLayout.LayoutParams and and specify some values.
>
> You can use layoutParams.setMargins (correspond to XML
> layout_marginLeft, layout_marginTop, etc.)
>
> Or you can use layoutParams.addRule (correspond to XML layout_below, etc.)
>
> -- Kostya
>
> 16.08.2010 19:12, nikhil пишет:
>
> > Just to add, I am using relative layout.
>
> > On Aug 15, 11:17 am, nikhil<[email protected]> wrote:
> >> Guys,
>
> >> I m trying to add remove and position an image but i am not able to.
> >> The image always shows up at 0, 0 . I am using an image view to do
> >> this.
>
> >> any pointers ?
>
> --
> Kostya Vasilev -- WiFi Manager + pretty widget --http://kmansoft.wordpress.com
--
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en