I want to make my textview automatically scrollable even if there is not so much text to fit into the screen. Also I didn't found any library which can scroll textview horizontally, only vertically.
I created my textview and here is my xml code:
<TextView
android:id="@+id/ticker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="My text"
android:focusable="true"
android:focusableInTouchMode="true"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:singleLine="true"
android:textColor="@color/black"
android:textSize="22sp" />
In my activity I use:
TextView ticker = findViewById(R.id.ticker);
ticker.setSelected(true);
The main thing is that text scrolls if text length is more that can fit screen but I need to make scrolling with any text. Any advices?