I want to create an activity such as mentioned in photo... as soon as I press the maximize button I want it to become full screen for the activity and part 1 become minimize, and again when I press the restore button I want it to become in a first state: to be able to see part 1 and part 2 ...
I think if we put two layouts it is possible? Isn't it? Please refer me to a resource to help me about this, or show me the code to achieve a solution.
There is a bit simplified solution, than Diego Palomar produced, without using additional variable. I'll take his code to show:
Part one and two should be in their own layout. After, play with the
visilibity
property of each layout. Specifically to hide any view without it continues to occupy its space, use the valuegone
for the visibility property.Ok, here I go. Below you have a complete example of how to hide/show grouped views.
main.xml
Activity
I hope this helps ;)