There is the way to change visibility of View, but how can I change programmatically visibility of layout defined in XML? How to get layout object?
this is a programatical approach:
view.setVisibility(View.GONE); //For GONE view.setVisibility(View.INVISIBLE); //For INVISIBLE view.setVisibility(View.VISIBLE); //For VISIBLE