When adding a view in an axml file, it is possible to simply specify the size and the units of the view's attribute, for example:
<TextView android:TextSize = "10sp" android:layout_marginTop = "10dp" />
But when applying a size programmatically, what are the units applied for the size sp? dp? px?
TextView tv = new TextView(); tv.TextSize = 10;
Also, how can I convert units?