Resize views, on making other views invisible
android, android-layout
Solution
Call `setVisibility(View.GONE)` on your `View`. When visibility is set to `VISIBLE` it is drawn, when set to `INVISIBLE` it is not drawn but still measured takes up space on the screen. When it is set to `GONE` it is not drawn and not measured.
Problem
I have an activity that has a linear layout, and a footer: The structure is somewhat like this : < LinearLayout > ... ... < LinearLayout > android:id="@+id/main_view" ... ... < /LinearLayout > < LinearLayout > android:id="@+id/footer" ... ... < /LinearLayout > < /LinearLayout > I am making the footer invisible on a certain condition. But I want to make the main_view, resize to take the space made available by making the footer invisible. Is there any way to do it? Any help is appreciated.