Text Protector

A simple Android library to “protect” part of text using Span


What is this?

This is a small library for replacing part of a text in a TextView with another character. From the box, the library includes protecting with Emojis or replacing with repeated characters.


  • Min SDK 21+


Add this in your root build.gradle at the end of repositories:

allprojects {
    repositories {
        maven { url 'https://jitpack.io' }

Add this line to your app’s dependencies:

implementation 'com.github.nestoleh:text-protector:version'


See sample project in repo here

Enjoy! ?


View Github