سؤال

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