A TextView that simulates the effect from the app Secret where the characters fade in/out at different speeds.

Overview

SecretTextView

Android Arsenal

A TextView that simulates the effect from the app Secret where the characters fade in/out at different speeds.

How To Use

Use it just like a normal TextView for the most part.

    <com.mattkula.secrettextview.SecretTextView
            android:id="@+id/textview"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_centerInParent="true"
            android:text="This is a demo of Matt Kula's Secret TextView"
            android:textSize="30sp"
            android:textColor="@android:color/black"
            />

To fade in or fade out the text:

secretTextView.show();    // fade in
secretTextView.hide();    // fade out
secretTextView.toggle();  // fade in or out depending on current state

To change the duration of the fading (default is 2.5 seconds):

secretTextView.setDuration(3000);     // set fade duration to 3 seconds

To set visibility without fading in or out:

secretTextView.setIsVisible(true);
secretTextView.setIsVisible(false);
Comments
  • Backport to support Android 2.x

    Backport to support Android 2.x

    I see in your Manifest, minSDK=11. Could you please make SecretTextView compatible with Android 2.x? (Is NineOldAndroid library helpful to backport animation of SecretTextView?)

    enhancement 
    opened by anticafe 3
  • Performance issue: Frequently GC

    Performance issue: Frequently GC

    Tks for your nice code first, but... while running your demo, I found the memory usage like this (tested on Genymotion 2.4 with intel acceleration, x64, android 5.1.0 on nexus 4): image

    Obviously, it's cause by: image


    I have fix that problem, pls see you pull request. The work I did is: 1, Use a MutableForegroundColorSpan to maintain the foreground color, instead new a ForeGroundColorSpan every time. 2, Change the MutableForegroundColorSpan object's color when needed.

    Here is memory usage after my fix(tested on Genymotion 2.4 with intel acceleration, x64, android 5.1.0 on nexus 4): image

    opened by walfud 1
  • Licence information

    Licence information

    Hello Matt!

    I like your SecretTextView and I'm going to use it in my project. Could you please provide licence information? It is very important for me.

    opened by itshnegg 1
  • setText() does not work after calling show() or hide().

    setText() does not work after calling show() or hide().

    Once show() or hide() is called, mIsReset becomes always true and setText() does not work. I fix it as below. Is it ok?

    private void resetSpannableString(double percent){ mIsReset = true; ... mIsReset = false; }

    remove mIsReset = false; from resetIfNeeded()

    opened by ghlin-daniel 0
  • farsi font in android 4.2.2

    farsi font in android 4.2.2

    hi matthewrkula thanks for this very cool lib. but i have problem in android 4.2.2 whit persian or farsi fonts . in android 4.2.2 farsi words showing sepratly i test in other apis and your libs works fine but in 4.2.2 have a problem with farsi font sample farsi font هرکه قدر خویش را بشناسد نابود نخواهد شد device-2016-01-07-071921

    opened by mohamadk 3
Owner
Matt Kula
Matt Kula
A simple and flexible Checked TextView or Checkable TextView

CheckableTextView Checkable TextView [KOTLIN] ⚡ A simple and flexible Checked TextView or Checkable TextView written in Kotlin ⚡ What's New Animation

null 110 Nov 20, 2022
Mentions-TextView - Make Mentions and hashtags clickable in Textview

Mentions Textview Custome Textview with Mentions and hashtags being clickable. D

null 2 Jan 9, 2022
() An Android TextView with a shimmering effect

Shimmer for Android This library is DEPRECATED, as I don't have time to mainatin it anymore. But feel free to go through the code and copy that into y

Romain Piel 2k Jan 7, 2023
Android's TextView that can expand/collapse like the Google Play's app description

ExpandableTextView ExpandableTextView is an Android library that allows developers to easily create an TextView which can expand/collapse just like th

Manabu S. 4k Dec 28, 2022
Animation effects to text, not really textview

HTextView Animation effects with custom font support to TextView see iOS Effects see Flutter Effects Screenshot type gif Scale Evaporate Fall Line Typ

hanks 5.5k Jan 5, 2023
A library to show emoji in TextView, EditText (like WhatsApp) for Android

Discontinued This projected is discontinued. Please consider using other alternative, i.e EmojiCompat. Contact me if you want to continue working on a

Hieu Rocker 3.6k Jan 5, 2023
A TextView that automatically resizes text to fit perfectly within its bounds.

AutoFitTextView A TextView that automatically resizes text to fit perfectly within its bounds. Usage dependencies { compile 'me.grantland:autofitt

Grantland Chew 4.2k Jan 1, 2023
Android experiment showing a sinking TextView

Titanic is an Android experiment reproducing this effect.

Romain Piel 1.8k Dec 15, 2022
A Custom TextView with trim text

ReadMoreTextView A Custom TextView with trim text Download To add the ReadMoreTextView library to your Android Studio project, simply add the followin

Borja B. 1.7k Dec 29, 2022
Advanced Android TextView

Advanced Android TextView Companion app for my Advanced Android TextView talk, demostrating: Animated CompoundDrawable Text shadow Custom font Non-bre

Chiu-Ki Chan 1.2k Dec 9, 2022
AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URLs (http://), Phone and Email automatically detecting and ability to handle clicks.

AutoLinkTextView Deprecated Please use the new version of AutoLinkTextView AutoLinkTextView is TextView that supports Hashtags (#), Mentions (@) , URL

Arman 1.1k Nov 23, 2022
Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the brand new Roboto Slab fonts.

Android-RobotoTextView Implementation of a TextView and all its direct/indirect subclasses with native support for the Roboto fonts, includes the bran

Evgeny Shishkin 782 Nov 12, 2022
This is based on an open source autosizing textview for Android.

SizeAdjustingTextView This is based on an open source autosizing textview for Android I found a few weeks ago. The initial approach didn't resize mult

Elliott Chenger 255 Dec 29, 2022
An extension of Android's TextView, EditText and Button that let's you use the font of your choice

AnyTextView (deprecated) Note: AnyTextView is no longer being maintained. I recommend replacing AnyTextView with the Calligraphy library instead. Frus

Hans Petter Eide 165 Nov 11, 2022
Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Provides easy means to validate with dependencies.

android-formidable-validation Form validation and feedback library for Android. Provides .setText for more than just TextView and EditText widgets. Pr

Linden 147 Nov 20, 2022
Simple way to create linked text, such as @username or #hashtag, in Android TextView and EditText

Simple Linkable Text Simple way to create link text, such as @username or #hashtag, in Android TextView and EditText Installation Gradle Add dependenc

Aditya Pradana Sugiarto 76 Nov 29, 2022
Customized and Expandable TextView

Customized and Expandable TextView Simple library to change the Textview as rectangle, circle and square shapes by adding one line of code in xml file

Raja Gopal 62 Sep 22, 2022
Lightweight android library for highlighting sections of a textview, with optional callbacks.

Linker Lightweight android library for highlighting Strings inside of a textview (ignoring case), with optional callbacks. Language: Java MinSDK: 17 J

Josh Gainey 35 Apr 30, 2022
TextView to display simple HTML

Project stopped This project has been stopped. 4.0 is the last release. Feel free to fork this project and take over maintaining. HtmlTextView for And

Sufficiently Secure 2.5k Dec 28, 2022