开发者

only one header between two Activities

how can i switch between two activities wich have the same header, for example an image. what i mean is, that their is an animation between the two activities, so the image is animated too. But i want, that only the body is animate and the image looks like freeze at the top. maybe i had to solve the probleme in another way because i have an activity with a listview inside an for example an imageview at the top. Now after i click on an item in the listview i want to refill the listview with an animation like move out - move in. i do so with two activities, but in this case, the imageview at the top is animated too. how can so开发者_如何学Clve this problem. Do i need two activities or one. if(activity == one) { How can i animate the refill of the listview }

I hope you understand what i mean.

Thx for the answers!


But i want, that only the body is animate and the image looks like freeze at the top.

That is not possible with multiple activities.

How can i animate the refill of the listview

Have two ListView widgets and animate one out and the other in, putting your new data into the one that is animating in. You could accomplish this with a ViewFlipper as the container, or apply the animations directly to the widgets.

Or, switch to fragments (Android 3.0 and the Android Compatibility Library) and use FragmentTransactions to animate a pair of ListFragments.


You can do it only inside one activity. You should implement Tweened Animation for list view and start it any time it was updated

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜