开发者

How to animate TextView and ImageView content change on android?

开发者 https://www.devze.com 2023-02-20 15:44 出处:网络
I have the following layout structure: ScrollView - LinearLayout - TextView - ImageView - TextView - ImageButton

I have the following layout structure:

ScrollView
 - LinearLayout
   - TextView
   - ImageView
   - TextView
   - ImageButton

once user presses button, next record is read from the DB and displayed in according field. How can I animate LinearLayout content change in such 开发者_如何学Pythona way that it will look like activity change?


I've implemented it in the following way:

private LinearLayout movieContainer;
movieContainer = (LinearLayout) findViewById(R.id.ll); // LinearLayout

Animation anim = AnimationUtils.loadAnimation(this, R.anim.slide_left); 
movieContainer.startAnimation(anim);
0

精彩评论

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