[android-developers] Re: position add remove imageview

2010-08-16 Thread nikhil
Just to add, I am using relative layout. On Aug 15, 11:17 am, nikhil nik...@gmail.com 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  ? -- You received this message

Re: [android-developers] Re: position add remove imageview

2010-08-16 Thread Kostya Vasilyev
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,

[android-developers] Re: position add remove imageview

2010-08-16 Thread nikhil
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,