title: ProgressBar not showing
body: <p>My Relative layout has two child Rcyclerview (Invisible) and progressbar . </p>
  
  <p><strong>What i want is</strong> : Oncreate of layout , recyclerview to invisible and progress bar to show until AsyncTask(getting images from SD folder) completes and recyclerview visible and progressbar invisible .</p>
  
  <p><strong>What Happening is</strong> : My app not showing progressbar . And after asyctask completes , my recyclerview shows up . </p>
  
  <p><strong>XML :</strong></p>
  
  <pre><code> &lt;RelativeLayout
                  android:layout_width="match_parent"
                  android:layout_height="match_parent"
                  android:layout_below="@+id/view3"&gt;
  
                  &lt;android.support.v7.widget.RecyclerView
                      android:layout_width="match_parent"
                      android:layout_height="wrap_content"
                      android:paddingTop="5dp"
                      android:divider="@null"
                      android:visibility="invisible"
                      android:id="@+id/recycler_view_cameragallery"
                      android:dividerHeight="0dp"
                      android:fadingEdge="none" /&gt;
  
                  &lt;ProgressBar
                      android:layout_width="wrap_content"
                      android:layout_height="wrap_content"
                      android:id="@+id/progressBar_Gallery"
                      style="?android:attr/progressBarStyleLarge"
                      android:layout_centerInParent="true"
                      android:layout_gravity="center"
                      android:padding="12dp" /&gt;
              &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p><strong>ActivityCode:</strong></p>
  
  <pre><code>public View onCreateView(LayoutInflater inflater,@Nullable ViewGroup container,@Nullable Bundle savedInstanceState){
  
          View rootView=inflater.inflate(R.layout.camera_layout,container,false);
          rootView.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
                  ViewGroup.LayoutParams.MATCH_PARENT));
          ButterKnife.inject(this,rootView);
          init();
          initialise(rootView);
          initialiseListeners();
          listofImagesPath = new ArrayList&lt;String&gt;();
          new mediaScanAyscTask().executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);}
  </code></pre>
  
  <p><strong>AsyncTask</strong></p>
  
  <pre><code>public class mediaScanAyscTask extends AsyncTask&lt;Void,Void,Void&gt;{
  
          @Override
          protected Void doInBackground(Void... params) {
  
              return null;
          }
  
          @Override
          protected void onPreExecute() {
              super.onPreExecute();
              adapter.clearApplications();
              galleryProgressBar.setVisibility(View.VISIBLE);
              galleryProgressBar.getIndeterminateDrawable().setColorFilter(Color.parseColor("#ff4081"), PorterDuff.Mode.MULTIPLY);
              cameraRecyclerView.setVisibility(View.INVISIBLE);
  
          }
  
          @Override
          protected void onPostExecute(Void aVoid) {
              listofImagesPath = RetriveCapturedImagePath();
  
              if(listofImagesPath!=null){
                  adapter.addApplications(listofImagesPath);
              }
              galleryProgressBar.setVisibility(View.INVISIBLE);
              cameraRecyclerView.setVisibility(View.VISIBLE);
              super.onPostExecute(aVoid);
          }
      }
  </code></pre>
  
  <blockquote>
    <p>Please help me by highlighting where i got wrong .</p>
  </blockquote>