Skip to content

Instantly share code, notes, and snippets.

@z8888q
Created April 28, 2012 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save z8888q/2516661 to your computer and use it in GitHub Desktop.
Save z8888q/2516661 to your computer and use it in GitHub Desktop.
how to remove a rule in layoutparams in Android
You can't remove a rule because all rules are always stored in a fixed-size java array. But you can set a rule to 0. For example
layoutParams.addRule(RelativeLayout.RIGHT_OF, 0);
layoutParams.addRule(RelativeLayout.BELOW, R.id.new_ref_LinearLayout);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment