Load Fragments on part of the screen?

Asked

Viewed 41 times

0

I wonder if it is possible to type a tablayout system only in part of the screen. ex:

inserir a descrição da imagem aqui

Where green, blue and orange are the buttons of the Tabs, and the red part would be the loaded Fragment, so by clicking on each of the buttons (green, blue and orange) it would change Fragment without affecting the rest of the layout. I would like to know if this is possible and if yes, how would you do it? If it is otherwise not with Fragments also serves.

If anyone has an example I’m grateful.

  • 1

    Uses a static Viewpager (so the user can’t slide it) and a normal Tablayout, but with a custom background. Briefly, yes, it is possible.

  • @itscorey would have some example or link?

  • 1

    Static viewpager you can find here: https://gist.github.com/itscorey/d9c747aaea785da08351bb68cffdbaac

  • 1

    You can use it as View in XML itself, no problem. Tablayout you see more about here: https://materialdoc.com/components/tabs/ | http://www.techotopia.com/index.php/Creating_an_Android_Tabbed_Interface_using_the_TabLayout_Component

  • @itscorey thank you very much, I’ll give a read here

No answers

Browser other questions tagged

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