All Projects → mdg-iitr → Rotatingtext

mdg-iitr / Rotatingtext

Licence: mit
A periodic text updating library

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rotatingtext

Android Justifiedtextview
android justified textview
Stars: ✭ 917 (-41.14%)
Mutual labels:  textview
Ariana
Provide Multiple Gradients in ImageViews and Texts. Integrate with ViewPager to change colors dynamically.
Stars: ✭ 74 (-95.25%)
Mutual labels:  textview
Jhform
JhForm - 自定义表单工具,更加简单,快捷的创建表单、设置页面
Stars: ✭ 108 (-93.07%)
Mutual labels:  textview
Linkifiedtextview
An extended TextView that allows you to detect several types of links such as urls, hashtags, phone numbers, etc.
Stars: ✭ 9 (-99.42%)
Mutual labels:  textview
Android Material Design In Practice
A project to demonstrate the latest material design principles with simple examples. It has additional examples on how to easily scale texts on different screen sizes without extra effort.
Stars: ✭ 67 (-95.7%)
Mutual labels:  textview
Tagging
A TextView that provides easy to use tagging feature for Mention or Hashtag
Stars: ✭ 91 (-94.16%)
Mutual labels:  textview
Rskgrowingtextview
A light-weight UITextView subclass that automatically grows and shrinks.
Stars: ✭ 820 (-47.37%)
Mutual labels:  textview
Szmentionsswift
Library to help handle mentions
Stars: ✭ 109 (-93%)
Mutual labels:  textview
Fole
Fole is a simple library to collapse and expand a TextView.
Stars: ✭ 67 (-95.7%)
Mutual labels:  textview
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (-1.16%)
Mutual labels:  textview
Omegaanimatedtext
Animate bold and italic transformations in TextView
Stars: ✭ 35 (-97.75%)
Mutual labels:  textview
Rwidgethelper
Android UI 快速开发,专治原生控件各种不服
Stars: ✭ 996 (-36.07%)
Mutual labels:  textview
Aligntextview
字体对齐的textview
Stars: ✭ 1,310 (-15.92%)
Mutual labels:  textview
Justifytextview
Deprecated
Stars: ✭ 25 (-98.4%)
Mutual labels:  textview
Pincodeinputview
A input text view for entering pin code.
Stars: ✭ 108 (-93.07%)
Mutual labels:  textview
Roundprogresstextview
TextView with Round Pogress
Stars: ✭ 18 (-98.84%)
Mutual labels:  textview
Leotextview
🐬A high-performance rich editor develop with swift on iOS platform, based on TextKit.
Stars: ✭ 87 (-94.42%)
Mutual labels:  textview
Pull To Refresh
ESPullToRefresh is developed and maintained by Vincent Li. If you have any questions or issues in using ESPullToRefresh, welcome to issue. If you want to contribute to ESPullToRefresh, Please submit Pull Request, I will deal with it as soon as possible.
Stars: ✭ 1,591 (+2.12%)
Mutual labels:  textview
Tkkeyboardcontrol
TKKeyboardControl adds keyboard awareness and scrolling dismissal (like iMessages app) to any view with only 1 line of code for Swift.
Stars: ✭ 110 (-92.94%)
Mutual labels:  textview
Materialbadgetextview
As the name describes, this is an Android library that you can use to show new messages badge and new features badge.
Stars: ✭ 1,331 (-14.57%)
Mutual labels:  textview

RotatingText

platform API License: MIT By-MDG

Rotating text is an Android library that can be used to make text switching painless and beautiful, with the use of interpolators, typefaces and more customisations.

Usage

Just add the following dependency in your app's build.gradle

dependencies {
      compile 'com.sdsmdg.harjot:rotatingtext:1.0.2'
}

Example Usage 1 (Simple)

XML

<com.sdsmdg.harjot.rotatingtext.RotatingTextWrapper
        android:id="@+id/custom_switcher"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

Java

RotatingTextWrapper rotatingTextWrapper = (RotatingTextWrapper) findViewById(R.id.custom_switcher);
rotatingTextWrapper.setSize(35);

Rotatable rotatable = new Rotatable(Color.parseColor("#FFA036"), 1000, "Word", "Word01", "Word02");
rotatable.setSize(35);
rotatable.setAnimationDuration(500);

rotatingTextWrapper.setContent("This is ?", rotatable);

Result

Example Usage 2 (Typeface + Interpolator)

XML

<com.sdsmdg.harjot.rotatingtext.RotatingTextWrapper
        android:id="@+id/custom_switcher"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

Java

Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/Raleway-Light.ttf");
Typeface typeface2 = Typeface.createFromAsset(getAssets(), "fonts/Reckoner_Bold.ttf");

RotatingTextWrapper rotatingTextWrapper = (RotatingTextWrapper) findViewById(R.id.custom_switcher);
rotatingTextWrapper.setSize(35);
rotatingTextWrapper.setTypeface(typeface2);

Rotatable rotatable = new Rotatable(Color.parseColor("#FFA036"), 1000, "Word", "Word01", "Word02");
rotatable.setSize(35);
rotatable.setAnimationDuration(500);
rotatable.setTypeface(typeface);
rotatable.setInterpolator(new BounceInterpolator());

rotatingTextWrapper.setContent("This is ?", rotatable);

Result

Example Usage 3 (Multiple Rotatables)

XML

<com.sdsmdg.harjot.rotatingtext.RotatingTextWrapper
        android:id="@+id/custom_switcher"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content" />

Java

Typeface typeface = Typeface.createFromAsset(getAssets(), "fonts/Raleway-Light.ttf");
Typeface typeface2 = Typeface.createFromAsset(getAssets(), "fonts/Reckoner_Bold.ttf");

RotatingTextWrapper rotatingTextWrapper = (RotatingTextWrapper) findViewById(R.id.custom_switcher);
rotatingTextWrapper.setSize(35);
rotatingTextWrapper.setTypeface(typeface2);

Rotatable rotatable = new Rotatable(Color.parseColor("#FFA036"), 1000, "Word", "Word01", "Word02");
rotatable.setSize(35);
rotatable.setTypeface(typeface);
rotatable.setInterpolator(new AccelerateInterpolator());
rotatable.setAnimationDuration(500);

Rotatable rotatable2 = new Rotatable(Color.parseColor("#123456"), 1000, "Word03", "Word04", "Word05");
rotatable2.setSize(25);
rotatable2.setTypeface(typeface);
rotatable2.setInterpolator(new DecelerateInterpolator());
rotatable2.setAnimationDuration(500);

rotatingTextWrapper.setContent("This is ? and ?", rotatable, rotatable2);

Result

Documentation

Rotating text is made of two parts : RotatingTextWrapper and Rotatable.
Each rotatable encapsulates the collection of words that are two be periodically switched and also defines various properties related to these words, like, size, color, animation interpolator etc.
Each Rotatable must be a part of a RotatingTextWrapper. This defines the actual layout of the text and the positions of the rotating text.

For eg : rotatingTextWrapper.setContent("This is ?", rotatble);. Here the ? denotes the postion of the rotatable.

RotatingTextWrapper

Property Function Description
Content setContent(...) Set the actual content. Composed of a String and array of Rotatables.
Typeface setTypeface(...) Set the typeface of the non-rotating text
Size setSize(...) Set the size of the non-rotating text
Pause pause(x) Method to pause the 'x'th rotatable
Resume resume(x) Method to resume the 'x'th rotatable

Rotatable

Property Function Description
Color setColor(...) Set the color of the rotating text associated with this rotatable
Size setSize(...) Set the size of the rotating text associated with this rotatable
Typeface setTypeface(...) Set the typeface of the rotating text associated with this rotatable
Interpolator setInterpolator(...) Set the animation interpolator used while switching text
Update Duration setUpdateDuration(...) Set the interval between switching the words
Animation Duration setAnimationDuration(...) Set the duration of the switching animation
Center Align setCenter(...) Align the rotating text to center of the textview if set to true

License

RotatingText is licensed under MIT license. View license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].