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

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -