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
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 Jan 8, 2023
() Android experiment showing a sinking TextView

Titanic 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 1.8k Dec 15, 2022
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 8, 2023
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 easy, flexible way to add a shimmering effect to any view in an Android app.

Shimmer for Android Shimmer is an Android library that provides an easy way to add a shimmer effect to any view in your Android app. It is useful as a

Facebook 5.1k Dec 31, 2022
A different beautiful Floating Edit Text

MaterialTextField A different beautiful Floating Edit Text Usage Surround your EditText by a MaterialTextField <com.github.florent37.materialtextfield

Florent CHAMPIGNY 1.5k Nov 11, 2022
RoundedLetterView like the one in Android 5.0 Contacts app

RoundedLetterView RoundedLetterView like the one in Android 5.0 Contacts app Attributes to choose from: rlv_titleText - The text in the first row. rlv

Pavlos-Petros Tournaris 653 Nov 11, 2022
A TextView that simulates the effect from the app Secret where the characters fade in/out at different speeds.

SecretTextView 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 l

Matt Kula 611 Nov 7, 2022
Android App that communicates with a back-end server to display different One Piece characters

About This project is an Android App that communicates with a back-end server to display different One Piece characters. It's roughly based on this co

Sam Garcia 1 Feb 4, 2022
Provides a set of views which allows to adjust the spacing between the characters of that view, AKA, Kerning effect.

KerningViews KerningViews provides a set of views (currently only TextView and Button) which lets you adjust the spacing between the characters in the

Aritra Roy 148 Aug 7, 2022
A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.

ADB Idea A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development. The following commands are provided: Uninst

Philippe Breault 2k Dec 28, 2022
Jetpack Compose animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animation

Compose Animation Examples. Useful Jetpack Compose animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animations that you can take inspiration from.

Mutual Mobile 149 Dec 22, 2022
A plugin for Android Studio that speeds up your day-to-day flutter development.

Flutter-Toolkit 中文文档 A plugin for Android Studio that speeds up your day-to-day flutter development. Flutter ToolKit(Flutter Build Runner Helper), to

苏晟 4 Oct 19, 2022
Android app simulates an emergency alerting mechanism, for falls, earthquakes and fires.

smart_alert This Android application simulates an emergency alerting mechanism, for falls, earthquakes and fires. Users can abort an emergency alert c

null 0 Nov 5, 2022
Myapp - An app that simulates persistence of a student's list at runtime

Student List Uma aplicação android que implementa uma lista de estudantes, ou pe

Emerson Przybyloviecz 0 Jan 2, 2022
The Race tracer app simulates the progress of two players in a race.

Race tracker app The Race tracer app simulates the progress of two players in a race. The idea is to demonstrate basic concepts of Kotlin coroutines.

Carlos Barrios 1 Oct 27, 2022
Android layout that simulates physics using JBox2D

PhysicsLayout Android layout that simulates physics using JBox2D. Simply add views, enable physics, and watch them fall! See it in action with the sam

John Carlson 689 Dec 29, 2022
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