Change Layout with your finger

Asked

Viewed 27 times

0

Hi, I’m wondering how do I change one layout to another by dragging the screen.... as if it were in a gallery but instead of photos would be different layouts

Thank you!!!

  • Could you be more specific? We can’t really understand how you want to display these layouts, we can imagine several ways to do this. You need to specify your question better or your question may be considered too broad.

1 answer

0


You have to use the component called Viewpager that allows you to slide sideways between several Fragments. For this you will also need to implement an Adapter for the same that will load the Fragments according to the "page" selected. And finally, you can set up a different layout for each Fragment.

More details and instructions:

https://developer.android.com/training/animation/screen-slide.html

Browser other questions tagged

You are not signed in. Login or sign up in order to post.