title: android layout with visibility GONE
body: <p>Four views are using same xml. I want to show a linear layout for <code>view 1</code> only.
  I put <code>android:visibility="gone"</code> in xml. And then I am doing the following for <code>view 1</code>- </p>
  
  <pre><code>LinearLayout layone= (LinearLayout) view.findViewById(R.id.layone);
  
  layone.setVisibility(View.VISIBLE);
  </code></pre>
  
  <p>But that doesn't set the visibility to visible.</p>
  
  <p>Isn't it possible to show the view once its declared <code>GONE</code> in xml ?</p>
  
  <p>I don't want to converse the logic by just doing,</p>
  
  <pre><code>layone.setVisibility(View.GONE);
  </code></pre>
  
  <p>in each of the three views except view 1.</p>
  
  <p>Ideas or comments?</p>
  
  <p>UPDATE:</p>
  
  <p>My xml - </p>
  
  <pre><code>&lt;TextView
                  android:id="@+id/layone"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Previous Page"
                  android:textColor="#000000"
                  android:textSize="16dp"
                  android:paddingLeft="10dp"
                  android:layout_marginTop="10dp"
                  android:visibility="gone" /&gt;
           &lt;LinearLayout
              android:layout_width="fill_parent"
              android:layout_height="50dp"
              android:orientation="horizontal"
              android:padding="10dp"
              android:gravity="center_vertical"
              android:layout_marginLeft="10dp"
              android:layout_marginRight="10dp"          
              android:tag="PrevEntries"     
              android:id="@+id/laytwo"
              android:layout_marginTop="10dp"
              android:background="@layout/roundedtext"
              android:visibility="gone" &gt;
  
              &lt;TextView
                  android:id="@+id/laythree"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:layout_weight="1"
                  android:text="Previous Page"
                  android:textColor="#000000"
                  android:textSize="18dp"
                  android:gravity="center"
                  android:textStyle="bold" /&gt;
  
          &lt;/LinearLayout&gt;
  </code></pre>