Set margin from code

Nastavení margin parametrů z kódu

 

LinearLayout.LayoutParams parametry = new LinearLayout.LayoutParams(LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);
parametry .setMargins(left, top, right, bottom); //v pixelech
button.setLayoutParams(parametry);
Kam dál?