简体   繁体   中英

Do I have to use an animation to change an Android activity's view?

Everywhere I look online, it seems that I must use an animation to change views dynamically (like slide in, out). Do I have to do this, or can I simple just setContentView() on each new activity?

Thanks!

There's nothing to say you have to use an animation. Just create your intent object, start your activity with startActivity or startActivityForResult , and then call setContentView when it loads. No animation necessary.

HTH.

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