How to make a set of views invisible in android
<p>I'm trying to make a set of views (<em>that include several textviews and buttons - all in <strong>different parent layouts</strong>, but in the same activity</em>) invisible if a particular condition is evaluated to false.</p>

<p>The conventional way to do that would be:</p>

<pre><code>findViewById(R.id.myview).setVisibility(View.INVISIBLE);
</code></pre>

<p>My question is, will I have to do this for all the views one by one that I want to be invisible, And then toggle them back when I want them visible?
Or, is there a way to avoid the code-repetition?</p>