From ebebb6f07a799e9e243669fc9f2e3c2337999584 Mon Sep 17 00:00:00 2001 From: potterhsu Date: Wed, 8 Mar 2017 14:33:08 +0800 Subject: [PATCH] Create README.md --- README.md | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..0c5b45c --- /dev/null +++ b/README.md @@ -0,0 +1,48 @@ +# MarqueeTextView +Android library of custom view to implement marquee feature. + +## Features +1. Fragment based, you can easily use marquee fragment in your layout. +2. Smooth, the text is slided by android animation. +3. Unlimited text size, since our approach will split text into multiple parts. + +![MarqueeTextView Illustration](https://raw.githubusercontent.com/potterhsu/MarqueeTextView/master/github/MarqueeTextViewIllustration.gif) + +## Setup +1. In root build.gradle: + ``` + allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } + } + ```` + +2. In target module build.gradle + ``` + dependencies { + compile 'com.github.potterhsu:MarqueeTextView:2.0' + } + ``` + +## Usage + +1. Initialize and automatically start + ```java + private MarqueeTextFragment marqueeTextFragment; + marqueeTextFragment = new MarqueeTextFragment(); + marqueeTextFragment.setMarqueeInfo( + new MarqueeTextFragment.MarqueeInfo("Some Text", Color.BLUE, 0.5f) + ); + ``` + +2. Stop + ```java + marqueeTextFragment.stopMarquee(); + ``` + +3. After stopping, you may want to start again + ```java + marqueeTextFragment.startMarquee(); + ```