The application uses Navigation Drawler , from which fragments are called. The structure of one of them is provided in miniature:

enter image description here

How to correctly write the logic so that inside this fragment, when switching tabs from below (each of them is linearlayout with OnClickListener ), only the contents of window 1 / window 2 change. To keep the lower part of the fragment itself, the tabs are not updated.

  • And how are you doing now that everything is updated? - YurySPb
  • Now two fragments. Both include the lower region, only the upper ones differ - window 1 / window 2. - Chekist
  • It may be suitable when inside the fragment (the entire thumbnail) when selecting tabs at the bottom, window1 / window2 elements will be hidden / displayed. I'll try. - Chekist

2 answers 2

Make the "window 1 / window 2" area a container for nested fragments and change them by clicking on the tabs.

  • The entire area of ​​the window 1/2 tab 1/2 is already a fragment. You mean, it is necessary to divide the window area and tabs into two more nested fragments in the first fragment? And then in the second one, using the new framgentmaneger, do show hide in windows? - Chekist
  • that's exactly what i mean - xkor

Inside the "window 1 / window 2" area, place two View (one below the other) and use the buttons at the bottom to hide / show windows.