Loading animation

Hello, I am printing the data I asked for text input 1 in my application to text input 2, but I want the data I entered in text input 1 to appear in animation when I press the button, but I want the animation not to appear when text input 2 is answered. how that happens?