Tengo TableRows
creado dinámicamente en el código y quiero establecer márgenes para estos TableRows
.Margen establecido programáticamente para TableRow
Mi TableRows
creado los siguientes:
// Create a TableRow and give it an ID
TableRow tr = new TableRow(this);
tr.setLayoutParams(new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT));
Button btnManageGroupsSubscriptions = new Button(this);
btnManageGroupsSubscriptions.setLayoutParams(new LayoutParams(LayoutParams.WRAP_CONTENT, 40));
tr.addView(btnManageGroupsSubscriptions);
contactsManagementTable.addView(tr);
¿Cómo se configura dinámicamente los márgenes de estos?
¡Funcionó! Tnx !!! – ofirbt
¿Qué tal un textView? setMargins undefined para textView. – Jaseem
No funcionó. Pero la respuesta de @mik a continuación funcionó, y debería haber sido la respuesta aceptada – Zvi