title: How to save loaded data from Firestore to Arraylist
body: <p>I'm using Firestore to keeping data. I want to load data and save it in Array.</p>
  
  <pre><code>@Override
      protected void onCreate(@Nullable Bundle savedInstanceState) {
          super.onCreate( savedInstanceState );
          setContentView( R.layout.activity_map );
  
          searchText = (AutoCompleteTextView) findViewById( R.id.search );
          gpsImage = (ImageView) findViewById( R.id.gps_btn );
          info = (ImageView) findViewById( R.id.info_btn );
          cafe = (ImageView) findViewById( R.id.cafe_btn );
          cafelist_btn = (ImageView)findViewById( R.id.cafelist );
  
  
          if(isServicesOK()){
              getLocationPermission();
          }
  
          db.collection("coll")
                  .get()
                  .addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
                      @Override
                      public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
  
                          for (DocumentSnapshot querySnapshot: task.getResult()){
                              placeDetail = new PlaceDetail(querySnapshot.getString("name"),
                                      querySnapshot.getString("address"),
                                      querySnapshot.getString("rating"),
                                      querySnapshot.getString("rates"));
  
                              namesList.add(placeDetail.getName());
                          }
                      }
  
                  });
          System.out.println("Size: " + namesList.size());
      }
  </code></pre>
  
  <p>In for loop I'm adding loaded data to ArrayList, but my print shows that list is empty. Is there any way to save data to ArrayList?</p>