I am analyzing an example with a vertical TextView http://developer.alexanderklimov.ru/android/views/verticaltextview.php

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <ru.alexanderklimov.test.RotateTextView android:id="@+id/rotateTextView1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#00ff00" /> </LinearLayout> 

enter image description here

Everything works on LinearLayout, but I need a more complex layout where RelativeLayout is used and here I am getting text clipping, how to fix it?

 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" > <ru.alexanderklimov.test.RotateTextView android:id="@+id/rotateTextView1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#00ff00" /> </RelativeLayout> 

enter image description here

  • one
    Well, if it works on LinearLayout, have you tried to put your TextView in LinearLayout and work like that? - Nikotin N
  • @NikotinN, tried, but only works when LineaLayout.layout_width / height = math_parent or fill_parent, as a result, the upper RelativeLayout is deformed. When LinearLayout.layout_width = wrap_content does not work - ravend
  • Try this solution from this answer - Ivan Vovk
  • @IvanVovk, thanks, but it exactly matches my version. Delivered the substrate in RelativeLayout, and left the text in the internal LinearLayout. Curved solution, but it works. - ravend

0