android - Set ImageView layout_gravity programmatically -


i need position imageview element on right side of framelayout element of it's child.

here's i've done far:

framelayout parentlayout; imageview checkimage = new imageview(anchor.getcontext()); linearlayout.layoutparams params = new    linearlayout.layoutparams(layoutparams.wrap_content, layoutparams.wrap_content); params.weight = 1.0f; params.gravity= 5; checkimage.setlayoutparams(params);    checkimage.setimagedrawable(anchor.getcontext().getresources().getdrawable(r.drawable.checkpoint));  parentlayout.addview(checkimage);    <framelayout     android:layout_width="match_parent"     android:layout_height="wrap_content" >      <button         android:id="@+id/popular_type"         android:layout_width="200dp"         android:layout_height="wrap_content"         android:background="@android:color/transparent"         android:gravity="left"         android:paddingbottom="10dp"         android:paddingleft="10dp"         android:paddingtop="10dp"         android:text="@string/filterbypopularclips" /> </framelayout> 


Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -