title: Making a smooth fade out for imageview in android
body: <p>I managed to make the imageView dissapear after 10 seconds(a tutorial image on my mainActivity). But i want to make a smooth fade out because like this it doesn`t look good, can anyone refer me to any good tutorial</p>
  
  <pre><code>     img=(ImageView)findViewById(R.id.ImageTutorial);
      if(getIntent()!=null)
      {
  
          Bundle extras = getIntent().getExtras();
          String TutorialDemo=extras !=null? extras.getString("TutorialDemo"):"false";
  
          if(TutorialDemo.equals("true"))
          {
              Runnable mRunnable;
              Handler mHandler=new Handler();
  
              mRunnable=new Runnable() {
  
                          @Override
                          public void run() {
  
                              img.setVisibility(View.GONE); //This will remove the View. and free s the space occupied by the View    
                          }
                      };
                      mHandler.postDelayed(mRunnable,10*900);
          }
          else
          {
              img.setVisibility(View.GONE);
          }
           }
  </code></pre>
  
  <p>here is the image view xml</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;ScrollView 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:id="@+id/fullview"
  &gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_margin="10dp"
      android:orientation="vertical" &gt;
  
        .
        .
        .
        .
  
      &lt;ImageView
          android:contentDescription="tutorial"
          android:id="@+id/ImageTutorial"
          android:layout_width="match_parent"
          android:layout_height="120dp"
          android:layout_alignParentBottom="true"
          android:background="@drawable/tutorial"
          android:layout_marginTop="40dp"
          android:gravity="center"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>