title: GetView in adapter never gets executed
body: <p>I have a following code in my custom adapter. I'm trying to set text in CheckedTextView, but it doesn't work. When I'm using debugger I can see getView and getCount is never called. What's wrong?</p>
  
  <pre><code>public class AccessPoint extends ArrayAdapter {
  
      private List&lt;String&gt; name  = new ArrayList&lt;String&gt;();
  
      public AccessPoint(Context context, int textViewResourceId, List&lt;String&gt; objects) {
          super(context, textViewResourceId, objects);
          this.name.addAll(objects);
      }
  
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return name.size();
      }
  
      @Override
      public Object getItem(int position) {
          // TODO Auto-generated method stub
          return name.get(position);
      }
  
      @Override
      public long getItemId(int position) {
          // TODO Auto-generated method stub
          return 0;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          // TODO Auto-generated method stub
            CheckedTextView textView = (CheckedTextView) convertView.findViewById(R.id.text);
            textView.setText(name.get(position));
          return convertView;
      }
  
  }
  </code></pre>
  
  <p>This is how I add adapter to listview:</p>
  
  <pre><code>accessPoints.add(new AccessPoint(getBaseContext(), 2131361936, objects));
  
          accessPointsListView.setAdapter(new ArrayAdapter&lt;AccessPoint&gt;(this, layout.access_point, accessPoints));
  </code></pre>
  
  <p>And my xml file, which resides in listview:</p>
  
  <pre><code>&lt;CheckedTextView xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="?android:attr/listPreferredItemHeight"
  android:checkMark="?android:attr/listChoiceIndicatorSingle"
  android:drawablePadding="8dp"
  android:drawableLeft="@drawable/image1"
  android:gravity="center_vertical"
  android:paddingLeft="2dip"
  android:id="@+id/text"
  android:paddingRight="2dip"
  android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  </code></pre>