I'm creating checkboxes in 2 diffent ways:
1) XML
<CheckBox
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="-10dp"
android:id="@+id/checkBox1" />
2) Java-code
CheckBox myCheckBox = new CheckBox(this);
myLayout.addView(myCheckBox);
And the look differently The one from code:
And from XML:
Why is that? And how can I make them equal?
Aucun commentaire:
Enregistrer un commentaire