I have tried the code below:
final View v = txt; //txt is my textview
Animation anim = new Animation() {
protected void applyTransformation(float interpolatedTime, Transformation animLinear) {
super.applyTransformation(interpolatedTime, animLinear);
// Do relevant calculations here using the interpolatedTime that
// runs from 0 to 1
v.setLayoutParams(new LinearLayout.LayoutParams(
LayoutParams.MATCH_PARENT, (int) (500 * interpolatedTime)));
}
};
anim.setDuration(1500);
v.startAnimation(anim);
It shows the layout line by line as you go down the view. I want a similar effect but in a reverse manner. In short, I want to show an animation wherein a TextView
is hidden from bottom to top line by line. I do not want a sliding effect. I wanna hide a view line by line.