All Projects → iamporus → TypedTextView

iamporus / TypedTextView

Licence: Apache-2.0 license
Custom implementation of Android's TextView simulating a keyboard/type-writer.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to TypedTextView

CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-54.39%)
Mutual labels:  android-ui, textview
LicenseTextView
Custom Lincese TextView for android
Stars: ✭ 31 (-45.61%)
Mutual labels:  android-ui, textview
Blitz
Android Library: Set self-updating string with relative time in TextView (e.g. 5 minutes ago)
Stars: ✭ 217 (+280.7%)
Mutual labels:  android-ui, textview
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (+412.28%)
Mutual labels:  android-ui, textview
Awesome Android Complete Reference
Awesome Android references for everything like best practices, performance optimization, etc.
Stars: ✭ 2,701 (+4638.6%)
Mutual labels:  android-ui
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+284.21%)
Mutual labels:  android-ui
Restring
Replace bundled Strings dynamically, or provide new translations, for Android
Stars: ✭ 217 (+280.7%)
Mutual labels:  android-ui
Folivora
An android library that supports set various drawables to view directly in your layout.xml
Stars: ✭ 207 (+263.16%)
Mutual labels:  android-ui
android-cuberto-dialog-design
This is an implementation inspired by beautiful design by Cuberto on his Dribble page, which can be found here https://dribbble.com/shots/3206606-Landing-page-wip
Stars: ✭ 15 (-73.68%)
Mutual labels:  android-ui
CCView
💳 Ready made credit card creation library. 💳
Stars: ✭ 42 (-26.32%)
Mutual labels:  android-ui
Pageindicator
An Instagram like page indicator compatible with RecyclerView and ViewPager.
Stars: ✭ 236 (+314.04%)
Mutual labels:  android-ui
Modern Android Development
Modern Android Development tools & key points
Stars: ✭ 219 (+284.21%)
Mutual labels:  android-ui
Collapsingtoolbarlayout Subtitle
Standard CollapsingToolbarLayout with subtitle support
Stars: ✭ 244 (+328.07%)
Mutual labels:  android-ui
Circular-Layout
A layout that arranges other views in a circle.
Stars: ✭ 46 (-19.3%)
Mutual labels:  android-ui
Primer
Intro Animation like Google Primer
Stars: ✭ 230 (+303.51%)
Mutual labels:  android-ui
Jackknife
⚔️ 金轮法王,哦不,是轮子大师带你玩转Android,是时候尝试下MVVM了。这是一个Android应用开发全家桶库,支持Kotlin+MVVM+Dagger2+Retrofit架构。
Stars: ✭ 215 (+277.19%)
Mutual labels:  android-ui
ShapeView
打造万能shape,再也不用写很多xml了,可以当做TextView,Button,EditText等多种控件,方便实用
Stars: ✭ 34 (-40.35%)
Mutual labels:  textview
Flowingdrawer
swipe display drawer with flowing & bouncing effects.
Stars: ✭ 2,535 (+4347.37%)
Mutual labels:  android-ui
Androidappshortcuts
App Shortcuts for Android on Pre Nougat 7.1!
Stars: ✭ 223 (+291.23%)
Mutual labels:  android-ui
Bottomsheetcoordinatorlayout
A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts inside.
Stars: ✭ 241 (+322.81%)
Mutual labels:  android-ui

TypedTextView

License MinSDK Build Status Language grade: Java Android Arsenal

Custom implementation of Android's TextView simulating a keyboard/typewriter.

Features

  • display a blinking cursor after every character typed.
  • characters are displayed on the screen with random speed which simulates human behavior.
  • emit audio keystrokes with typed characters.
  • Lifecycle-aware component. Character typing and audio stops/resumes as per Activity/Fragment state.
  • support to maintain state across Activity/Fragment lifecycle.
  • delay on sensing comma(,) and full stops(.) to simulate user pauses.
  • display sentences on new line on sensing full stops in passed text.

Gradle

  • Step 1. Add the JitPack repository to your build file.

Add following in your Project level build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
  • Step 2. Add the dependency
dependencies {
  ...
  implementation 'com.github.iamporus:TypedTextView:x.y.z'
}

The latest version of TypedTextView is

Usage - XML

Simple Usage

<com.prush.typedtextview.TypedTextView
        android:id="@+id/typedTextView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="start"
        android:textSize="24sp"
        app:typed_text="Once there lived a monkey in a jamun tree by a river. The monkey was alone. He had no friends, no family, but he was happy and content."/>

Customizations

<com.prush.typedtextview.TypedTextView
        android:id="@+id/typedTextView"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:gravity="start"
        android:textSize="24sp"
        app:randomize_typing_speed="true"
        app:randomize_type_seed="75"
        app:show_cursor="true"
        app:cursor_blink_speed="530"
        app:sentence_pause="1500"
        app:split_sentences="true"
        app:play_keystrokes_audio="true"                                   //use default audio 
        app:play_keystrokes_audio_res="@raw/your_audio_keystroke_res_id"   //OR use custom audio
        app:typed_text="Once there lived a monkey in a jamun tree by a river. The monkey was alone. He had no friends, no family, but he was happy and content."
        app:typing_speed="175"/>

Usage - Java

Simple Usage

TypedTextView typedTextView = findViewById( R.id.typedTextView );

typedTextView.setTypedText( "Once there lived a monkey in a jamun tree by a river. The monkey was alone. He had no friends, no family, but he was happy and content." );

//Attach TypedTextView's lifecycle to Activity's lifecycle.
getLifecycle().addObserver( typedTextView.getLifecycleObserver() );

Customizations

TypedTextView typedTextView = findViewById( R.id.typedTextView );

//Using Builder

TypedTextView.Builder builder = new TypedTextView.Builder( typedTextView )
                .setTypingSpeed( 175 )
                .splitSentences( true )
                .setSentencePause( 1500 )
                .setCursorBlinkSpeed( 530 )
                .randomizeTypingSpeed( true )
                .showCursor( false )
                .playKeyStrokesAudio( true )
                .randomizeTypeSeed( 250 );

typedTextView = builder.build();

typedTextView.setTypedText( "Once there lived a monkey in a jamun tree by a river. The monkey was alone. He had no friends, no family, but he was happy and content." );

//----------------------------------------------------- OR ---------------------------------------------------------------

//Set typing speed
typedTextView.setTypingSpeed( 175 );

//Configure sentences
typedTextView.splitSentences( true );
typedTextView.setSentencePause( 1500 );

//Configure Cursor
typedTextView.showCursor( true );
typedTextView.setCursorBlinkSpeed( 530 );

//Configure randomizing typing speed to simulate human behaviour
typedTextView.randomizeTypingSpeed( true );
typedTextView.randomizeTypeSeed( 75 );

//Play default keystrokes audio
typedTextView.playKeyStrokesAudio( true );
        
//OR play custom keystrokes audio
typedTextView.playKeyStrokesAudio( R.raw.your_audio_keystroke_res_id );
        
//Set text to be typed
typedTextView.setTypedText( "Once there lived a monkey in a jamun tree by a river. The monkey was alone. He had no friends, no family, but he was happy and content." );

//Attach TypedTextView's lifecycle to Activity's lifecycle.
getLifecycle().addObserver( typedTextView.getLifecycleObserver() );
        
//Set listener to invoke other actions based on status.
typedTextView.setOnCharacterTypedListener( new TypedTextView.OnCharacterTypedListener()
{
  @Override
  public void onCharacterTyped( char character, int index )
  {
    Log.d( TAG, "onCharacterTyped: " + character + " at index " + index );
  }
});

License

Copyright 2019 Purushottam Pawar

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].