Scrolling Textview Value Are Cut Off
I have a simple TextView: Copy
and added the features from your previous question HorizontalScrollView cut the text in a TextView and autoscorlling
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin">
<TextView
android:id="@+id/textView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:ellipsize="marquee"
android:scrollHorizontally="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:foregroundGravity="left"
android:marqueeRepeatLimit="marquee_forever"
android:maxLines="1"
android:text="Title Song and too much information to display in one line."
android:textAppearance="?android:attr/textAppearanceMedium"/>
</RelativeLayout>
Solution 2:
Try adding this to your XML layout:
android:maxLines="1"
Solution 3:
Remove the code: android:singleLine="true"
from your xml.
Post a Comment for "Scrolling Textview Value Are Cut Off"