// Path: htextview-base/src/main/java/com/hanks/htextview/base/AnimationListener.java
// public interface AnimationListener {
//     void onAnimationEnd(HTextView hTextView);
// }
// 
// Path: htextview-base/src/main/java/com/hanks/htextview/base/HTextView.java
// public abstract class HTextView extends TextView {
//     public HTextView(Context context) {
//         this(context, null);
//     }
// 
//     public HTextView(Context context, AttributeSet attrs) {
//         this(context, attrs, 0);
//     }
// 
//     public HTextView(Context context, AttributeSet attrs, int defStyleAttr) {
//         super(context, attrs, defStyleAttr);
//     }
// 
//     public abstract void setAnimationListener(AnimationListener listener);
// 
//     public abstract void setProgress(float progress);
// 
//     public abstract void animateText(CharSequence text);
// }


import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;
import com.hanks.htextview.base.AnimationListener;
import com.hanks.htextview.base.HTextView;
package com.example.demoapp;




/**
 * Created by hanks on 2017/3/14.
 */

public class BaseActivity extends AppCompatActivity {
    String[] sentences = {"What is design?",
            "Design is not just",
            "what it looks like and feels like.",
            "Design is how it works. \n- Steve Jobs",
            "Older people",
            "sit down and ask,",
            "'What is it?'",
            "but the boy asks,",
            "'What can I do with it?'. \n- Steve Jobs",
            "Swift",
            "Objective-C",
            "iPhone",
            "iPad",
            "Mac Mini", "MacBook Pro", "Mac Pro", "爱老婆", "老婆和女儿"};
    int index;

    class ClickListener implements View.OnClickListener {
        @Override
        public void onClick(View v) {
            if (v instanceof HTextView) {
                if (index + 1 >= sentences.length) {
                    index = 0;
                }
                ((HTextView) v).animateText(sentences[index++]);
            }
        }
    }

// Path: htextview-base/src/main/java/com/hanks/htextview/base/AnimationListener.java
// public interface AnimationListener {
//     void onAnimationEnd(HTextView hTextView);
// }
// 
// Path: htextview-base/src/main/java/com/hanks/htextview/base/HTextView.java
// public abstract class HTextView extends TextView {
//     public HTextView(Context context) {
//         this(context, null);
//     }
// 
//     public HTextView(Context context, AttributeSet attrs) {
//         this(context, attrs, 0);
//     }
// 
//     public HTextView(Context context, AttributeSet attrs, int defStyleAttr) {
//         super(context, attrs, defStyleAttr);
//     }
// 
//     public abstract void setAnimationListener(AnimationListener listener);
// 
//     public abstract void setProgress(float progress);
// 
//     public abstract void animateText(CharSequence text);
// }


// Path: demoapp/src/main/java/com/example/demoapp/BaseActivity.java
import android.content.Context;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Toast;
import com.hanks.htextview.base.AnimationListener;
import com.hanks.htextview.base.HTextView;

package com.example.demoapp;




/**
 * Created by hanks on 2017/3/14.
 */

public class BaseActivity extends AppCompatActivity {
    String[] sentences = {"What is design?",
            "Design is not just",
            "what it looks like and feels like.",
            "Design is how it works. \n- Steve Jobs",
            "Older people",
            "sit down and ask,",
            "'What is it?'",
            "but the boy asks,",
            "'What can I do with it?'. \n- Steve Jobs",
            "Swift",
            "Objective-C",
            "iPhone",
            "iPad",
            "Mac Mini", "MacBook Pro", "Mac Pro", "爱老婆", "老婆和女儿"};
    int index;

    class ClickListener implements View.OnClickListener {
        @Override
        public void onClick(View v) {
            if (v instanceof HTextView) {
                if (index + 1 >= sentences.length) {
                    index = 0;
                }
                ((HTextView) v).animateText(sentences[index++]);
            }
        }
    }

    class SimpleAnimationListener implements AnimationListener {