I don't think there's a way to set it directly in dip.
You can use this method to convert from dip to px and use the result to size the view.
private static float scale = 0;
...
public static int dps2pixels(int dps, Context context) {
if (0 == scale) {
scale = context.getResources().getDisplayMetrics().density;
}
return (int) (dps * scale + 0.5f);
}