title: how to add progress bar on loading in Firebase recyclerview
body: <p>I am builiding a app the fetchs the data from firebase using firebase recycler adapter i need to implement the progress in that recyler view.</p>
  <p>i am unable to get how to load a particular amount of data at a time for example load 3 items and show progress bar and then load other items.
  And also show progress bar when the items are loading in the start</p>
  <p>this is the code where data is being fetched</p>
  <pre><code>final ProgressBar p1=(ProgressBar)rootView.findViewById(R.id.StreetRecyclerProgress);
                  final LinearLayout likeLayout=(LinearLayout)rootView.findViewById(R.id.Likee);
                  MainArea.viewPager.setBackgroundResource(R.drawable.grey_background);
                  myRef1 = FirebaseDatabase.getInstance().getReference().child(&quot;Video_Upload&quot;).child(&quot;Street&quot;);
                  myRef1.keepSynced(true);
                  myRef1.orderByKey();
                  rView = (RecyclerView) rootView.findViewById(R.id.StreetRecyclerView);
                  rView.hasFixedSize();
                  LinearLayoutManager layoutManager = new LinearLayoutManager(getActivity()) {
  
                      @Override
                      public void smoothScrollToPosition(RecyclerView recyclerView, RecyclerView.State state, int position) {
                          LinearSmoothScroller smoothScroller = new LinearSmoothScroller(getActivity()) {
  
                              private static final float SPEED = 300f;// Change this value (default=25f)
  
                              @Override
                              protected float calculateSpeedPerPixel(DisplayMetrics displayMetrics) {
                                  return SPEED / displayMetrics.densityDpi;
                              }
  
                          };
                          smoothScroller.setTargetPosition(position);
                          startSmoothScroll(smoothScroller);
                      }
  
                  };
                  rView.setLayoutManager(layoutManager);
                  FBRA = new FirebaseRecyclerAdapter&lt;StreetDataFetcher, Street_food.StreetViewHolder&gt;(
                          StreetDataFetcher.class,
                          R.layout.card_recycler_view,
                          Street_food.StreetViewHolder.class,
                          myRef1
                  ) {
                      @Override
                      protected void populateViewHolder( Street_food.StreetViewHolder viewHolder, StreetDataFetcher model, final int position ) {
                          //p1.setVisibility(View.INVISIBLE);
                          viewHolder.setTitle(model.getVideoName());
                          viewHolder.setShortDesc(model.getShort_Desc());
                          viewHolder.setUsername(model.getUserName());
                          viewHolder.setDate(model.getDateTime());
                          viewHolder.setVideoPath(model.getVideoPath());
                          viewHolder.setProfile(model.getProfileImage());
                          viewHolder.itemView.setOnClickListener(new View.OnClickListener() {
                              @Override
                              public void onClick( View v ) {
                                  final String mref;
                                  mref=FBRA.getRef(position).getKey().toString().trim();
                                  //Toast.makeText(getActivity(),mref.toString(),Toast.LENGTH_SHORT).show();
                                   Intent i=new Intent(getActivity(),StreetVideoView.class);
                                  i.putExtra(&quot;position&quot;,mref);
                                  startActivity(i);
  
                              }
                          });
                          viewHolder.itemView.findViewById(R.id.Likee).setOnClickListener(new View.OnClickListener() {
                              @Override
                              public void onClick( View v ) {
                                  ImageView a;
                                  a=(ImageView)v.findViewById(R.id.likeImage);
                                  a.setImageResource(R.drawable.ic_heart_on);
                                  final String mref;
                                  mref=FBRA.getRef(position).getKey().toString().trim();
                                  final DatabaseReference myyRef=FirebaseDatabase.getInstance().getReference().child(&quot;Video_Upload&quot;).child(&quot;Street&quot;).child(mref).child(&quot;Likes&quot;);
                                  myyRef.addListenerForSingleValueEvent(new ValueEventListener() {
                                      @Override
                                      public void onDataChange( DataSnapshot dataSnapshot ) {
                                          Integer i=Integer.valueOf(dataSnapshot.getValue().toString());
                                          int ii=i+1;
                                          String like_value= String.valueOf(ii);
                                          myyRef.setValue(like_value);
                                      }
  
                                      @Override
                                      public void onCancelled( DatabaseError databaseError ) {
  
                                      }
                                  });
                              }
                          });
                      }
                  };
  
                  rView.setAdapter(FBRA);
                  
  </code></pre>
  <p><strong>things i need in this code is the progress bar should show when recycler view is fetching/ loading data</strong></p>