In the application, I have:
LinearLayout linearLayout2 = (LinearLayout) findViewById(R.id.cvLinearLayout2);
and after :
linearLayout2.setVisibility(View.GONE);
I cannot find a way to return linearLayout2 .
I tried everything:
linearLayout2.setVisibility(View.VISIBLE); linearLayout2.bringToFront(); linearLayout2.getParent().requestLayout(); linearLayout2.forceLayout(); linearLayout2.requestLayout(); linearLayout2.invalidate();
but without results. linearLayout2 have one parent element linearLayout1 , so I also tried:
linearLayout1.requestLayout(); linearLayout1.invalidate();
still with zero results. linearLayout2 remains GONE . In my application, I need to move linearLayout , and then, after some time, redraw it again. Please, help.
source share