I want to reset a textView height after I have added it to the main window in the xml file.
inside a RelativeLayout,
the sample way for this if you want to use dimen
first, you should set size in dimen XML file.
50dp
50dp
and
text_l.getLayoutParams().height =
getResources().getDimensionPixelSize(R.dimen.text_height);
text_l.getLayoutParams().width =
getResources().getDimensionPixelSize(R.dimen.text_width);
Or
if you want to set just int (for example we wanna set 50dp height and 100dp width)
text_l.getLayoutParams().height = 50 * 3;
text_l.getLayoutParams().width= 100 * 3;