title: Method getView on ArrayAdapter does not get called?
body: <p>I wanna set the Swipecard with a Custom ArrayAdapter. The problem is that I need to wait until I get all users (for the cards), but when I call my adapter from within the onDataChange methods from firebase it simply does not work.</p>
  <p>This is my adapter:</p>
  <pre><code>public class CardAdapter2 extends ArrayAdapter&lt;User&gt; {
  
      private int resourceLayout;
      private Context mContext;
  
      public CardAdapter2(Context context, int resource, List&lt;User&gt; items) {
          super(context, resource, items);
          this.resourceLayout = resource;
          this.mContext = context;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
  
          LayoutInflater inflater = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          convertView = inflater.inflate(resourceLayout, parent, false);
  
          TextView text = convertView.findViewById(R.id.text);
          text.setText(getItem(position).getName() + &quot;aaaaaa&quot;);
  
          return convertView;
      }
  }
  </code></pre>
  <p>The method in MainActivity which should call the adapter:</p>
  <pre><code>    private void retrieveProfiles() {
          Util.getmUserDatabaseRef().child(Util.getFbUser().getUid()).addValueEventListener(new ValueEventListener() {
              @Override
              public void onDataChange(@NonNull DataSnapshot dataSnapshot) {
                  //for (DataSnapshot snap : dataSnapshot.getChildren()) {
                  userList.add(dataSnapshot.getValue(User.class));
                  userList.add(dataSnapshot.getValue(User.class));
                  userList.add(dataSnapshot.getValue(User.class));
                  //}
                  //callCardsAdapter();
                  //anyMethod();
                  adapter2 = new CardAdapter2(context, R.layout.item, userList);
                  cards.setAdapter(adapter2);
              }
  
              @Override
              public void onCancelled(@NonNull DatabaseError databaseError) {
  
              }
          });
      }
  </code></pre>
  <p>If I place the setAdapter in &quot;onCreate&quot; it does not have time to fulfill the userList. The thing is, the method getView just get called when I call my CardAdapter from within the onCreate method, otherwise It never get called. And yes, the list has elements on it before calling CardAdapter. Any help?</p>
  <p>It's everything fine with the layout, testing it with fixed elements it works, but I need to retrieve Objects from database.</p>