I tried to change RelativeLayout's height programmatically, that is using Java. I have the following code:
RelativeLayout rl = (RelativeLayout) findViewById(R.id.center);
rl.getLayoutParams().height = 100;
I'm bothered of the unit of height.
Is it px, dp or some other unit?
If it is px, is there a way I can use dp since dp is more advisable than px because it's actually dynamic?