I'm trying to use the setLayoutParams method to specify the graphical parameters of my table layout, but I'm not sure if the setLayoutParams method accepts pixel values ββor dip values, especially in java, the stored values ββseem to be pixel values, for example, if I declare these two variables:
private int blockDimension = 50; private int blockPadding = 2;
And then call the method:
tableRow.setLayoutParams(new LayoutParams( (blockDimension + 2 * blockPadding) * numberOfColumnsInMineField,blockDimension + 2 * blockPadding) );
Are they treated like pixels or are they converted after passing to the method? Then if this is not the case, how can I set dip values ββin java?
akari source share