Text in TextView getting cropped behind relativeLayout for small size devices

31 views Asked by At

I have TextView and fixed height[45dp] Relative layout aligned at bottom which shows icons.

As the textView has maxLines = 3 and ellipsis = end, in small size display[4 inches] Or if the display size is increased, the text gets behind the relativeLayout at bottom.

XML layout image here

In 6 inch devices Or smaller display size it shows properly.

My structure is- Relativelayout -TextView [layout_alignParentTop="true"] -Relativelayout [showing icons- layout_alignParentBottom="true"]

Can the text be ellipsis with 2 max lines if it is getting overlapped with bottom relativeLayout? Or any other way to achieve this?

I tried using constrained layout, but the text still gets cropped. also I tried to set max lines to 1 in case of views overlapping with getLocationInWindow() but for some reason the method didn't work.

0

There are 0 answers