title: Android visibility issue with checkbox
body: <p>I´m using a checkbox in my code that when its checked it makes a textview and a editText visibles, but if I uncheck de checkbox they continue being visible instead of dissapear.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>final CheckBox save = (CheckBox) findViewById(R.id.checkbox);
          save.setOnClickListener(new OnClickListener() {
              public void onClick(View v) {
  
  
  
                  // Perform action on clicks, depending on whether it's now checked
                  if (((CheckBox) v).isChecked()) {
  
                      nameText.setVisibility(1);
                      editName.setVisibility(1);
  
                  } else {
  
                      nameText.setVisibility(0);
                      editName.setVisibility(0);
  
                  }
              }
          });
  </code></pre>
  
  <p>And part of the xml which is inside an Relative Layout:</p>
  
  <pre><code>    &lt;LinearLayout android:id="@+id/linearLayout3"
              android:orientation="horizontal"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:layout_below = "@+id/linearLayout2"&gt;
  
      &lt;TextView android:id="@+id/text"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" 
          android:text="@string/name" 
          android:visibility="invisible"/&gt;
      &lt;EditText android:id="@+id/name" 
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" 
          android:layout_weight="1"
          android:visibility="invisible"/&gt;    
  
  
      &lt;CheckBox android:id="@+id/checkbox"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="@string/save" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>What should i do to make the textView and EditText dissapear when i uncheck the checkbox?</p>
  
  <p>Thank you!</p>