title: How to change text visibility on android application
body: <p>im a student and i'm working on my first andorid  app.
  I want to create e button that can hide and show a text, so i've wrote this on fragment :</p>
  
  <pre><code>&lt;TextView android:id="@+id/textView1" 
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_alignParentTop="true" 
       android:layout_centerHorizontal="true"
       android:layout_marginTop="36dp" 
       android:text="@string/t1"
       android:visibility="invisible"/&gt;
  
    &lt;ImageButton android:id="@+id/imageButton2" 
           android:layout_width="wrap_content" 
           android:layout_height="wrap_content" 
            android:layout_below="@+id/textView1"
           android:layout_centerHorizontal="true"
           android:layout_marginTop="38dp"
            android:onClick="click_button1"
            android:src="@drawable/pippo"
           android:text="@string/s1" /&gt;
  </code></pre>
  
  <p>and this on main:</p>
  
  <pre><code> public void click_button1 (View view){ 
          TextView textview=(TextView)findViewById(R.id.textView1); 
             textview.setVisibility(View.VISIBLE);
       }
  </code></pre>
  
  <p>on main what can i use to change visibility?!</p>