AutoTypingTextView


Source link: https://github.com/krsticdragan/AutoTypingTextView

AutoTypeTextView

AutoTypeTextView is simple android library which is extending TextView with several auto typing animations. It simulate typing, encrypting a text and decrypting a text animation. You can define a speed of every animation and in the case of typing with mistakes, you can define a precision.

There are 4 type of animations:

  • Auto typing with mistakes
  • Auto typing without mistakes
  • Encrypit animation
  • Decrypt animation

Installation

Installation of AutoTypeTextView is preety simple. Just add in build.gradle

compile 'com.krsticdragan:autotypetextview:1.1' 

Usage

XML

Add a new namespace which you will use for adding AutoTypeTextView and using its tags.

xmlns:attv="http://schemas.android.com/apk/res-auto" 

So your root layout will look something like this.

<?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:attv="http://schemas.android.com/apk/res-auto" 

After that you will need to define AutoTypeTextView by adding it in your XML. Now you can use a namespace which are we already defined.

<com.dragankrstic.autotypetextview.AutoTypeTextView

android:id="@+id/lblTextWithoutMistakes"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

attv:animateTextTypeWithoutMistakes="Hello World!" /> 

Animations

Defining animation speed

Typing speed, Encryption speed and Decryption speed can be defined in XML by using:

attv:encryptionSpeed = 50 attv:decryptionSpeed = 50 attv:typingSpeed = 80 

or programmatically by defining a speed in ms.

lblTextWithoutMistakes.setTypingSpeed(100);
 lblTextDecryption.setDecryptionSpeed(30);
 lblTextEncryption.setEncryptionSpeed(30);
 

When you are using TypingWithMistakes, you need to setup precision in order to define how many mistakes you will animate.

attv:typingPrecision=8 

AutoTypingWithoutMistakes

Setup Auto Typing Animation without mistakes in XML by using:

attv:typingSpeed="100" attv:animateTextTypeWithoutMistakes="Hello World!" 

or programmatically by using a function

lblTextWithoutMistakes.setTypingSpeed(100);
 lblTyping.setTextAutoTyping("Hello World!");
 

AutoTypingWithMistake

Setup Auto Typing animation in XML by defining:

attv:animateTextTypeWithMistakes="Hello World!" attv:typingPrecision=8 

Precision can be set programatically by defining it using AutoTypeTextView.PRECISSION_LOW, AutoTypeTextView.PRECISSION_MED, AutoTypeTextView.PRECISSION_HIGH.

lblTextWithMistakes.setTextAutoTypingWithMistakes("Hello World! This is AutoTypeTextView.", AutoTypeTextView.PRECISSION_MED);
 

animateEncryption

Setup Encryption animation in XML by defining:

attv:animateEncryption="Hello World!" attv:encryptionSpeed="20" 

or programmatically

lblTextEncryption.setEncryptionSpeed(20);
 lblTextEncryption.animateEncryption("Hello World!");
 

animateDecryption

Setup Decryption animation:

attv:decryptionSpeed="50" attv:animateDecryption="Hello World!"  

or programmatically

lblTextDecryption.setDecryptionSpeed(50);
 lblTextDecryption.animateDecryption("Hello World! This is AutoTypeTextView");
 

Resources

This is example of application built with VIPER architecture.

CountryCodePicker will help users to

  • Search and select Country
  • Get selected country's name,code,currency and dial code

Gradle build inspector, clarifies what's going on inside your Gradle build.

Android library monitoring hardware sensors with RxJava Observables.

Frutilla lets java software development teams describe the tests in plain text, and link them to the specifications.

Twidere is a powerful twitter client for Android 4.0+, which gives you a full Material experience and nearly complete (and even better) Twitter feature.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes