Skip to content

Instantly share code, notes, and snippets.

@XjojoX1989
Created April 4, 2020 09:00
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 XjojoX1989/2bc3fe425877c1a7afce98613f314ce3 to your computer and use it in GitHub Desktop.
Save XjojoX1989/2bc3fe425877c1a7afce98613f314ce3 to your computer and use it in GitHub Desktop.
MarginLayoutParams params = (MarginLayoutParams) btn.getLayoutParams();
params.leftMargin += 100;
btn.requestLayout();// 請求重新對View進行measure、layout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment