title: getView() of custom ArrayAdapter<Item> not getting called
body: <p>I have my custom adapter as follow.
  My aim is to display, upcoming &amp; past appointments in a one <code>ListView</code>. So I decided to go with <code>Custom ArrayAdapter</code>.
  But I have no clue why getView() is not getting called. Also overridden <code>getCount()</code> gives 50 as size of <code>items</code></p>
  
  <pre><code>public class AppointmentListAdapter extends ArrayAdapter&lt;Item&gt; {
  
      List&lt;Item&gt; items;
      private Context context;    
      private LayoutInflater vi;
      public static boolean pastApptSectionDrawn = false;
      private int healowUserId, portalUserId;
  
      public AppointmentListAdapter(Context context, List&lt;Item&gt; items, int healowUserId, int portalUserId){
          super(context, 0, items);
          this.context = context;
          this.items = items;
          vi = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);     
          this.healowUserId = healowUserId;
          this.portalUserId = portalUserId;
      }
  
  
      @Override
      public int getCount() {
          return this.items.size();
      }   
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent){
          System.out.println("getView of AppointmentListAdapter...");
          View v = convertView;
          final Item item = items.get(position);      
          if(item != null){
              if(item.isSection()){
                  ApptListSection si = (ApptListSection)item;
                  String title = si.getTitle();
                  v = vi.inflate(R.layout.appointment_list_section, null);
                  v.setOnClickListener(null);
                  v.setOnLongClickListener(null);
                  v.setLongClickable(false);
                  View apptSectionShape = v.findViewById(R.id.apptSectionShape);
                  TextView apptSectionTitle = (TextView) v.findViewById(R.id.apptSectionTitle);
                  if(apptSectionShape != null)
                      apptSectionShape.setBackgroundResource(si.getBgResourceId());
                  if(apptSectionTitle != null)
                      apptSectionTitle.setText(si.getTitle());
  
                  final TextView sectionView = (TextView) v.findViewById(R.id.list_item_section_text);                
                  sectionView.setText(title);
                  if(Global.NO_UPCOMING_APPT.equals(title)){
                      final LinearLayout sectionItemLayout = (LinearLayout) v.findViewById(R.id.section_item_layout);
                      sectionItemLayout.setMinimumHeight(CommonUtilities.getDPEquivalentPixels(this.context, 60F));                   
                      sectionItemLayout.setBackgroundColor(Color.WHITE);
                      sectionItemLayout.setGravity(Gravity.CENTER);
                      sectionView.setTextSize(18);
                      sectionView.setTextColor(Color.BLACK);
                      sectionView.setBackgroundColor(Color.WHITE);
                      sectionView.setGravity(Gravity.CENTER);                 
                  }
              }else{
                  Appointment appt = (Appointment)item;
                  v = vi.inflate(R.layout.list_items_appointments_loading, null);
                  final TextView appointmentDate = (TextView) v.findViewById(R.id.appointmentDate);
                  final TextView practiceName = (TextView) v.findViewById(R.id.txtApptProviderName);
                  final TextView apptReason = (TextView) v.findViewById(R.id.txtApptReason);
                  final TextView txtDayOfMonth = (TextView) v.findViewById(R.id.txtDayOfMonth);
                  final TextView txtMonthYear = (TextView) v.findViewById(R.id.txtMonthYear);
                  final TextView txtDayOfWeek = (TextView) v.findViewById(R.id.txtDayOfWeek);
                  final TextView txtApptTime = (TextView) v.findViewById(R.id.txtApptTime);
                  int colorIndCode;
                  if(appt.isPastAppointment()){
                      colorIndCode = Color.parseColor("#e4a83c");                  
                  }else{
                      colorIndCode = Color.parseColor("#69cbd8");
                  }
  
                  txtDayOfMonth.setTextColor(colorIndCode);
                  txtDayOfWeek.setTextColor(colorIndCode);
  
                  if(appointmentDate != null){
                      Calendar cal = Calendar.getInstance();                  
                      Date startDateTime = appt.getStartDateTime();
                      cal.setTime(startDateTime);
  
                      //StringBuilder timeBuilder = new StringBuilder(new SimpleDateFormat("MMM").format(startDateTime)+ " " + cal.get(Calendar.DAY_OF_MONTH)+ ", " + cal.get(Calendar.YEAR)+ " ");
                      StringBuilder timeBuilder = new StringBuilder("");
                      int hour = cal.get(Calendar.HOUR);
                      timeBuilder.append(((hour&lt;10)?"0":"") + hour + ":");
                      int mins = cal.get(Calendar.MINUTE);
                      timeBuilder.append(((mins&lt;10)?"0":"") + mins + " ");
                      timeBuilder.append(cal.get(Calendar.AM_PM) == Calendar.AM ? "AM":"PM");
  
                      appointmentDate.setText(timeBuilder.toString());
                      txtDayOfMonth.setText((cal.get(Calendar.DAY_OF_MONTH)));
                      String month_year = new SimpleDateFormat("MMM").format(startDateTime) + " " + cal.get(Calendar.YEAR);
                      txtMonthYear.setText(month_year);
                      txtDayOfWeek.setText(new SimpleDateFormat("EEEE").format(startDateTime));
                      txtApptTime.setText(timeBuilder.toString());
  
                  }
  
                  if(practiceName != null){
                      practiceName.setText(appt.getUfname() + " " + appt.getUlname());
                  }
  
                  if(apptReason != null){
                      apptReason.setText(appt.getReason());
                  }               
  
                  //Write the code to decide on note &amp; reminder symbol 
  
              }
          }           
          return v;
      }
  
  }`
  </code></pre>