Android library of custom view to implement marquee feature.
- Fragment based, you can easily use marquee fragment in your layout.
- Smooth, the text is slided by android animation.
- Unlimited text size, since our approach will split text into multiple parts.
- In root build.gradle:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
- In target module build.gradle
dependencies {
compile 'com.github.potterhsu:MarqueeTextView:2.0'
}
- Initialize and automatically start
private MarqueeTextFragment marqueeTextFragment;
marqueeTextFragment = new MarqueeTextFragment();
marqueeTextFragment.setMarqueeInfo(
new MarqueeTextFragment.MarqueeInfo("Some Text", Color.BLUE, 0.5f)
);
- Stop
marqueeTextFragment.stopMarquee();
- After stopping, you may want to start again
marqueeTextFragment.startMarquee();