TextView size and scrolling issue (Android) -
I only have a TextView in the ScrollView that can have different text. Text size is always different The problem is Whether or not it can be fully placed on the TextView screen on different screens. I want to put vertical text on the screen. If the text is small, then it works fine but if the length of the text can be higher than the screen, then it loses the beginning of the text and there is also the strange spaces after the text. How can I fix this?
The textual attribute of gravity
just focuses horizontal text, but layout_gravity
is the strange thing that I described above if I have layout_gravity < / Code>, all the text looks good, but this scrollview = (
& lt; ScrollView is on top of Android: layout_width = "match_parent" android: Android: layout_alignParentTop = "True" Android: layout_margin = "15dp"> TextView Android: id = "@ + id / textview" Android: layout_width = "Left_Heat =" 0 DP "Andro E: Android: Android: Android: Android: Android: Gravity = "center" Android: Leaut_graviti = "Sentr_warti" android: text size = "36 SP" android: text style = "bold" /> gt; & lt; / ScrollView & Gt;
<
ScrollView
no need for you XML is required to add 2 attributes:Android: Maxline
andandroid: scrollbars = "vertical"
XML < / P>
& Lt; Android: Android: Android: Android: ID = "@ + ID / Baby STRSTXTView" Ayout_width = "wrap_content" android: layout_height = "wrap_content" android: layout_marginTop = "18dp" Android: maxLines = "3" Android: paddingLeft = "50dp "Android: paddingRight =" 50dp "Android: scrollbars =" vertical "android: text =" Lorem Ipsum is just the dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard standard dummy text ever since 1500s. "Android : TextColor = "@ color / fragment_page_txt_color" Android: typeface = "sans" />
Java BabySitterDescTxtView.setMovementMethod (new ScrollingMovementMethod ());
Comments
Post a Comment