문제

I'm using view flipper to make the user to be able to slide between layouts by clicking to related button, But the thing is, I have around 10 different layouts and some of them are quite complex. So I get "Out of Memory" Error.

I searched something on the internet and what I see is ,swiping between layouts with gestures. And What I want is just to be able to slide between two layouts with "slide in" and "slide out" animations. NOT with GESTURES and SWIPING, by just clicking the button. It will be like a new activity starts but I just want to slide between layouts. Thanks is advance !

도움이 되었습니까?

해결책

Fragments! Dynamically build, show, hide and destroy them. And use XML animations to do whatever animation you want for transition.

다른 팁

Use the ViewPager with Fragments, both of which can be found in the support library and are compatible all the way down to Android 1.6.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top