in your program, the unit of width is px, your 600 may have a dp value, you can use the following code to check:
final float scale = context.getResources().getDisplayMetrics().density;
estimate the scale of attraction, if scale = 320/600 = 0.5333333, that is, 600 is the value of dp.
source share