RTL marquee text view android right to left moving text - persian - farsi - arabic - urdo
FreeAdd it in your root build.gradle at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
dependencies {
implementation 'com.github.mehranelyas:RtlMarqueeView:1.5.3'
}
<com.mehranelyas.rtlmarquee.RtlMarqueeView
android:id="@+id/rtlMarqueeView"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
rtlMarqueeView = findViewById(R.id.rtlMarqueeView);
rtlMarqueeView.setText(YOUR_TEXT_HERE);
set text and it will start
rtlMarqueeView.setText(YOUR_TEXT_HERE);
use your own font
rtlMarqueeView.setTypeface(YOUR_TYPEFACE);
set loop forever (Default is true)
rtlMarqueeView.setLoopForever(true or false);
if this set the text will animate in your specific time
rtlMarqueeView.setDuration(MILISECOND);
if this set the text will jump to the specific time that you set at the start
rtlMarqueeView.setCurrentTime(MILISECOND);
set the start delay Defaul is 1000 (1 second)
rtlMarqueeView.setFirstGap(MILISECOND);
set the end delay Defaul is 2000 (2 second)
rtlMarqueeView.setLastGap(MILISECOND);
set the speed of moving text, Default is 4.0 (if this set the duration will calculate Automaticly)
rtlMarqueeView.setSpeed(FLOAT);
1.0 is very fast
2.0 is fast
3.0 is normall
and more...
you can test it