Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onDraw(Canvas canvas) {
- final long time = SystemClock.uptimeMillis();
- final long delta = time - mLastTime;
- if (delta >= TEXT_CHARACTER_DELAY_MS) {
- mLastTime = time; // revision 7 should have this line
- if (mText != null) {
- if (mCurrentCharacter <= mText.length()) {
- CharSequence subtext = mText.subSequence(0, mCurrentCharacter);
- setText(subtext, TextView.BufferType.SPANNABLE);
- mCurrentCharacter++;
- postInvalidateDelayed(TEXT_CHARACTER_DELAY_MS);
- } else {
- if (mOkArrow != null) {
- mOkArrow.setVisibility(View.VISIBLE);
- }
- }
- }
- }
- super.onDraw(canvas);
- }
Advertisement
Add Comment
Please, Sign In to add comment