简体   繁体   中英

Animating/transitioning text/textViews - android studio

Basically I have implemented a fade out function from one textView to another, and I'm wanting to know how I could fade out after delay or transition to other text after delay.

Java code:

 if (event.getAction() == MotionEvent.ACTION_DOWN) {

            pView.setText("Nice");
            pView.startAnimation(AnimationUtils.loadAnimation(PlayScreen.this, android.R.anim.slide_in_left));

The code works fine in my app and I've found other questions that use other ways for animations but nothing useful to this method, or would it be better to use the valueAnimator?

https://github.com/daimajia/AndroidViewAnimations您可以使用此库,它非常简单

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM