GithubHelp home page GithubHelp logo

awukuernest483 / typewriterview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from skymansandy/typewriterview

0.0 1.0 0.0 7.12 MB

Android library for typewriter like effects

Home Page: https://android-arsenal.com/details/1/6996

License: Apache License 2.0

Java 100.00%

typewriterview's Introduction

TypeWriterView

Download License MinSDK Android Arsenal Build Status

A simple Android library for typewriter like effects

Features:

  • Animate contents of textview as if it were typed by a TypeWriter
  • Set Animation Text appearance duration
  • Set TypeWriter sound effect (With or without sound)
  • Set Typing animation listeners (4 available)
  • Set all the usual attributes of TextView and style your view.

Demonstration

Demo TypeWriterView

Usage

Dependency:

dependencies {
     implementation 'in.codeshuffle:typewriterview:1.1.0'
}

XML Usage

<in.codeshuffle.typewriterview.TypeWriterView
       android:id="@+id/typeWriterView"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:textSize="30sp"
       android:textStyle="bold" />           

Java Usage

        //Create Object and refer to layout view
        TypeWriterView typeWriterView=(TypeWriterView)findViewById(R.id.typeWriterView);
        
        //Setting each character animation delay
        typeWriterView.setDelay(int);
        
        //Setting music effect On/Off
        typeWriterView.setWithMusic(boolean);
         
        //Animating Text
        typeWriterView.animateText(string);
        
        //Remove Animation. This is required to be called when you want to minimize the app while animation is going on. Call this in onPause() or onStop()
        typeWriterView.removeAnimation();

Listeners available

Implement the given interface and override these stuff:

          //Implement this to your class
          yourClass extends someBaseClass implements TypeWriterListener
          
          //then listen to callbacks
          typeWriterView.setTypeWriterListener(this)
            
          //animation starts with animateText()
          onTypingStart(String text);
          
          //animation typed one character (for each character)
          onCharacterTyped(String text, int position);

          //Animation is removed using removeAnimation()
          onTypingRemoved(String text);
          
          //Animation ends printing entire text
          onTypingEnd(String text);

Note

- The function animateText() if called with another string when already an animation is going on, will have no effect!!

License

 Copyright 2018 SkyManSandy

 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.

typewriterview's People

Contributors

skymansandy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.