Skip to content

USisFounderOfISIS/Telegram-Components-Animated-NumberTextView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Telegram Components: Animated NumberTextView

Beautiful Animated NumberTextView extracted from Telegram source code

Getting started

Add a copy of NumberTextView.java in your project.

Define the NumberTextView in XML (or you can define it in activity without using XML):

<.... NumberTextView
    android:id="@+id/numberTextView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

Then:

final NumberTextView numberTextView = findViewById(R.id.numberTextView);
numberTextView.setTextSize(28);
numberTextView.setTextColor(Color.RED);
numberTextView.setTextAlignment(TEXT_ALIGNMENT_CENTER);
//numberTextView.setTypeface(Typeface.SANS_SERIF);
int counter = 0;
button.setOnClickListener(v -> {
            binding.numberTextView.setNumber(counter, true, false);
            counter++;
        });

That's it!

About

Beautiful Animated NumberTextView extracted from Telegram source code

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages