I want to make the height of a dynamically created TextView to be 50dp. I tried making a dimens.xml
file with the code
<dimen name="imageview_height">50dp</dimen>
And then I use
int pixels = getResources().getDimensionPixelSize(R.dimen.imageview_height);
and finally on the generated TextView I simply use.
textView.setHeight(pixels);
However when I run it, my app crashes and says app name keeps stopping.