I have editText
which by default leaves lots of space. I added backgroud for textView, cause editText backgroud is not possible.
When I execute command:
editText.setHeight(50);
of no matter what integer it gives me same result:
My text gets cropped. I think somehow I need to reduce editText margins to fit my text here.
Main problem is that there is to much space between rows in first picture.
You can do like this
int reducedValue =5;
editText .setPadding(editText .getPaddingLeft()-reducedValue,
editText .getPaddingTop()-reducedValue,
editText .getPaddingRight()-reducedValue,
editText .getPaddingBottom()-reducedValue);
editText.setCompoundDrawablesWithIntrinsicBounds(editText .getPaddingLeft()-reducedValue,
editText .getPaddingTop()-reducedValue,
editText .getPaddingRight()-reducedValue,
editText .getPaddingBottom()-reducedValue);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.