开发者

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

开发者 https://www.devze.com 2023-01-09 10:40 出处:网络
Everywhere I look online, it seems that I must use an a开发者_开发百科nimation to change views dynamically (like slide in, out). Do I have to do this, or can I simple just setContentView() on each new

Everywhere I look online, it seems that I must use an a开发者_开发百科nimation 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号