- 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 all the usual attributes of TextView and style your view.
Demo TypeWriterView |
---|
dependencies {
compile 'in.codeshuffle:typewriterview:1.0.5'
}
<in.codeshuffle.typewriterview.TypeWriterView
android:id="@+id/typeWriterView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="30sp"
android:textStyle="bold" />
//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();
- The function animateText() when called multiple times on same view, is tweaked to display all the strings concatenated. Use with care, Synchronously.
- Music effect of typewriter doesn't stop if app is minimized while text is being animated.
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.