android - How to set layout_alignParentRight="false" programmatically? -


this question has answer here:

how set android:layout_alignparentright="false" programmatically? can set true code want set false programmatically:

relativelayout.layoutparams params = (relativelayout.layoutparams)myview.getlayoutparams(); params.addrule(relativelayout.align_parent_right); button.setlayoutparams(params); 

there method removerule(int) it's added in (api level 17). want use in api level 7 or 8.

this code set false:

addrule(relativelayout.align_parent_right,0) 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -