title: How to refresh Listview always tabbed layout?
body: <p>I have a tabbed layout with 2 fragments:</p>
  
  <p>1 - Form to register</p>
  
  <p>2 - Format to view the registered documents</p>
  
  <p>The second tab has a <code>ListView</code> data, and his code to get data is:</p>
  
  <pre class="lang-java prettyprint-override"><code>public class PatologiaListaFragment extends Fragment {
      private static final String TAG = "FragmentLista";
      private FirebaseFirestore db = FirebaseFirestore.getInstance();
      private FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();
      private CollectionReference usuarios;
  
  
      @Nullable
      @Override
      public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
          View root = inflater.inflate(R.layout.fragment_patologias_lista, container, false);
  
      usuarios = db.collection("Usuarios").document(firebaseAuth.getCurrentUser().getUid().toString()).collection("Doencas");
  
      ArrayList&lt;Doenca&gt; doencaArrayList = new ArrayList&lt;Doenca&gt;();
  
          usuarios.get().addOnCompleteListener(new OnCompleteListener&lt;QuerySnapshot&gt;() {
              @Override
              public void onComplete(@NonNull Task&lt;QuerySnapshot&gt; task) {
                  if (task.isSuccessful()) {
                      for (QueryDocumentSnapshot document : task.getResult()) {
                         Doenca doenca = document.toObject(Doenca.class);
                          doencaArrayList.add(doenca); // add data to arraylist adapter
                          Log.i("Lets moving", doencaArrayList.toString());
                          Log.d(TAG, document.getId() + " =&gt; " + document.getData());
                      }
                      ListView listView = (ListView) root.findViewById(R.id.listViewCadastro);
                      ArrayAdapter adapter = new DoencaAdapter(getActivity(), doencaArrayList);
                      listView.setAdapter(adapter); //arrayadapter set
  
                  } else {
                      Log.d(TAG, "Erro ao puxar documentos", task.getException());
                  }
              }
          });
      return root;
      }
  
  }
  </code></pre>
  
  <p>I receive data to <code>ListView</code> adapter from my server on Firebase, when I close and open the app, the listview refresh, but, I need that whenever you move to one side and forward(before tab), you need to update the ListView adapter.</p>
  
  <p>Is possible? Or I need to migrate to <code>RecyclerView</code>?</p>