title: add loading before the result show, i use glide for my image display
body: <p>please construct my code, i want a loading image while the result is not ready..</p>
  
  <p>i use glide for this code..</p>
  
  <pre><code>imageView = (ImageView) rootView.findViewById(R.id.imageView);
  Glide.with(getActivity()).load("http://joehamirbalabadan.com/android/android/imghome/index1.png").diskCacheStrategy(DiskCacheStrategy.ALL).placeholder(R.drawable.indexloading).into(imageView);
  
  imageView3 = (ImageView) rootView.findViewById(R.id.imageView3);
  Glide.with(getActivity()).load("http://joehamirbalabadan.com/android/android/imghome/index3.png").diskCacheStrategy(DiskCacheStrategy.ALL).placeholder(R.drawable.indexloading).into(imageView3);
  </code></pre>
  
  <p>as you can see in my code, i use placeholder indexloading.</p>
  
  <p>but gif loading image is not working in placeholder.</p>
  
  <p>please give me a sample code that solb my problem..</p>
  
  <p>also code that work in a fragment..</p>
  
  <p>here is the complete code..</p>
  
  <p><strong>HomeFragment.java</strong></p>
  
  <pre><code>package com.example.administrator.mosbeau;
  
  
  import android.app.Activity;
  import android.app.Fragment;
  import android.app.FragmentManager;
  import android.os.Bundle;
  import android.support.annotation.Nullable;
  import android.view.LayoutInflater;
  import android.view.View;
  import android.view.ViewGroup;
  import android.widget.ImageView;
  import android.widget.ProgressBar;
  
  import com.bumptech.glide.Glide;
  import com.bumptech.glide.load.engine.DiskCacheStrategy;
  
  
  /**
   * Created by Administrator on 9/7/2015.
   */
  public class HomeFragment extends Fragment {
  
      public static HomeFragment newInstance() {
          HomeFragment fragment = new HomeFragment();
          return fragment;
      }
  
      public HomeFragment () {
      }
  
      Boolean InternetAvailable = false;
      Seocnd detectconnection;
  
      ImageView imageView, imageView3;
      ProgressBar progressBar;
  
      @Nullable
      @Override
      public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
          View rootView = inflater.inflate(R.layout.homelayout, container, false);
  
          detectconnection = new Seocnd(getActivity());
          InternetAvailable = detectconnection.InternetConnecting();
          if (InternetAvailable) {
  
              imageView = (ImageView) rootView.findViewById(R.id.imageView);
              Glide.with(getActivity()).load("http://joehamirbalabadan.com/android/android/imghome/index1.png").diskCacheStrategy(DiskCacheStrategy.ALL).placeholder(R.drawable.indexloading).into(imageView);
  
              imageView3 = (ImageView) rootView.findViewById(R.id.imageView3);
              Glide.with(getActivity()).load("http://joehamirbalabadan.com/android/android/imghome/index3.png").diskCacheStrategy(DiskCacheStrategy.ALL).placeholder(R.drawable.indexloading).into(imageView3);
  
  
          } else {
              NointernetFragment fragment = new NointernetFragment();
              FragmentManager fragmentManager = getFragmentManager();
              fragmentManager.beginTransaction()
                      .replace(R.id.container, fragment)
                      .commit();
          }
  
          return rootView;
      }
  
      @Override
      public void onAttach(Activity activity) {
          super.onAttach(activity);
          ((MainActivity) activity).onSectionAttached(1);
      }
  
  }
  </code></pre>