android - I have a two imageView in a Relative Layout. Is it possible to change the Position of one imageview dynamically. while the other remain constant.? -
android - I have a two imageView in a Relative Layout. Is it possible to change the Position of one imageview dynamically. while the other remain constant.? -
i have 2 image views defined in xml. want alter position of 1 of them dynamically while other remains constant.?? suggestions. thanx.
yes off course, damn possible.use layouparam
imageview img1=(imageview) findviewbyid(r.id.imageview); imageview img2=(imageview) findviewbyid(r.id.imageview); relativelayout.layoutparams lp2=new relativelayout.layoutparams(100, 100); lp2.addrule(relativelayout.align_right,img2.getid()); img1.setlayoutparams(lp2);
setting margin
lp2.setmargins(left, top, right,bottom);
android android-layout android-widget
Comments
Post a Comment