title: how to change a GONE visibility to VISIBLE visibility in android studio
body: <p>In my application, I set my Frame Layout visibility to GONE, and I want to show the Frame layout when i click a check box. would it be possible to set it VISIBLE ?</p>
  
  <p>xml:this is the entire xml code</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView
  xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  style="@style/Container"&gt;
  
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical"&gt;
  
  &lt;ImageView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:src="@drawable/red_logo"/&gt;
  
  &lt;TextView
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:text="Marchant Offer"
      android:textSize="30px"
      android:textColor="#ff0000"/&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;Spinner
          android:id="@+id/spinnerCountry"
          android:layout_weight="1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
      &lt;/Spinner&gt;
  
      &lt;TextView
          android:layout_weight="1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="Country" /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;Spinner
          android:id="@+id/spinnerState"
          android:layout_weight="1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
      &lt;/Spinner&gt;
  
      &lt;TextView
          android:layout_weight="1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="State/Province" /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;EditText
      android:id="@+id/editTextCity"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:hint="City"/&gt;
  
  &lt;EditText
      android:id="@+id/editTextAirport"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:hint="Neareast Airport"/&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;Spinner
          android:id="@+id/spinnerCategory"
          android:layout_weight="1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"&gt;
      &lt;/Spinner&gt;
  
      &lt;TextView
          android:layout_weight="1"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="Category" /&gt;
  
  
  &lt;/LinearLayout&gt;
  
  &lt;EditText
      android:id="@+id/editSTextOfferTitle"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:hint="Offer Title"/&gt;
  
  &lt;EditText
      android:id="@+id/editTextOfferSummary"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:hint="Offer Summary"/&gt;
  
  
  &lt;EditText
      android:id="@+id/editTextOfferDescription"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:hint="Offer Description"/&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Offer Highlights"/&gt;
  
      &lt;Button
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Add"/&gt;
  &lt;/LinearLayout&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Inclusion"/&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Others Inclusion"/&gt;
  
      &lt;Button
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Add"/&gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:orientation="horizontal"&gt;
  
      &lt;TextView
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="Do You Offer Inclusive Hotel/Port Pick-Up and Drop-off"/&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
      &lt;CheckBox
          android:id="@+id/checkBoxYes"
          android:layout_weight="1"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content" /&gt;
  
          &lt;TextView
              android:layout_weight="1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Yes"/&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:orientation="horizontal"&gt;
          &lt;CheckBox
              android:id="@+id/checkBoxNo"
              android:layout_weight="1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content" /&gt;
  
  
          &lt;TextView
              android:layout_weight="1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="No"/&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  
   &lt;FrameLayout
      android:id="@+id/frameLayout"
      android:layout_width="fill_parent"
      android:layout_height="match_parent"
      android:visibility="gone"&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical"&gt;
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:text="@string/ifyes"/&gt;
  
      &lt;EditText
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:hint="Your picking up coverage area"/&gt;
  
          &lt;EditText
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:hint="Time to picking up the Guess"/&gt;
  
          &lt;EditText
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
              android:hint="Additional Info for Guess"/&gt;
      &lt;/LinearLayout&gt;
    &lt;/FrameLayout&gt;
   &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>java code:</p>
  
  <pre><code>checkBoxYes = (CheckBox)findViewById(R.id.checkBoxYes);
  checkBoxYes.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
      @Override
      public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
          if(isChecked){
              frameLayout.setVisibility(View.VISIBLE);
          }
      }
  });
  </code></pre>