A scrollView added to framelayout , and linearlayout1 with multiple linearlayout1 scrolling up / down and linearLayout2 for an enlarged view container.
Those. each view can increase when you click on it, and when this happens, a linearLayout2 container linearLayout2 , which is initially invisible.
Is it possible to somehow linearLayout2 container linearLayout2 in the center of the screen (display)? The fact is that all layoutParams (including gravity) provide for the alignment of the child element with respect to the parent, and here you need alignment with the screen, i.e. so that, when linearLayout2 clicked, linearLayout2 an indent above = 0 from the top edge of the display and occupies the entire available width and height of the display.