title: The getView() method of a custom ArrayAdapter is not executed
body: <p>In my project I have to display a list of reports so in the <code>Activity</code> I write the following code:</p>
  
  <pre><code>super.onCreate(savedInstanceState);
          setContentView(R.layout.report_full);
              List&lt;Employee&gt; data = new ArrayList&lt;Employee&gt;();
          Employee eg=new Employee();
          ListView li=(ListView)findViewById(R.id.report_list);
          Intent myIntent = getIntent(); // this is just for example purpose
          Bundle b=myIntent.getExtras();
          Log.i("User Report", b.toString());
          Toast.makeText(getApplicationContext(), "User Report", Toast.LENGTH_LONG).show();
          if(b !=null) {
                  String username = b.getString("username");
                  String userid = b.getString("userid");
                  String startdate = b.getString("startdate");
                  String enddate = b.getString("enddate");
                  String mode=b.getString("mode");
                  Log.i("LOOP", userid+"-"+startdate+"-"+enddate+"-"+mode);
                  data=eg.getReports(username, userid, startdate, enddate,mode);
                  Log.i("Get Report",data.toString());
                  li.setAdapter(new UserReportArrayadapter(this, data));
              }
  </code></pre>
  
  <p>and in <code>UserReportArrayadapter.java</code> I write the following code:</p>
  
  <pre><code>    private LayoutInflater inflater;
      private List&lt;Employee&gt; data;
      public UserReportArrayadapter(Context context, List&lt;Employee&gt; objects) {
          super(context, R.layout.list_time_mode_report, objects);
          Log.i("User Report by HoursAdapter","Inside constructor");
          inflater = LayoutInflater.from(context);
          this.data = objects;
  }
  
      @Override
      public int getCount() {
          // TODO Auto-generated method stub
          return 1;
      }
  
      @Override
      public View getView(int position, View convertView, ViewGroup parent) {
          ViewHolder holder;
          Log.i("User Report ","Inside getView");
          //if it's not create convertView yet create new one and consume it
            if(convertView == null){
              //instantiate convertView using our employee_list_item
                convertView = inflater.inflate(R.layout.list_time_mode_report, null);
                //get new ViewHolder
                  holder =new ViewHolder();
                 //get all item in ListView item to corresponding fields in our ViewHolder class
                   holder.project=(TextView)convertView.findViewById(R.id.time_entry_1);
                  holder.hours=(TextView)convertView.findViewById(R.id.time_entry_2);
  
                //set tag of convertView to the holder
                convertView.setTag(holder);
           }
          //if it's exist convertView then consume it
            else {
                 holder =(ViewHolder) convertView.getTag();
             }      
               //set data to holder
            Log.i("User Report by HoursAdapter:data",data.get(position).getData());
              holder.project.setText(data.get(position).getData());
              holder.hours.setText(data.get(position).getNo_of_hrs());
  
             return convertView;
        }
           //ViewHolder class that hold over ListView Item
           static class ViewHolder{
               TextView hours;
               TextView project;
  
  
          }
  </code></pre>
  
  <p>In the log, only <code>"User Report"</code>, <code>"Inside getView"</code> is displayed. The constructor is invoked but <code>getView()</code> is not called. On running this application, there are no items displayed in screen. Why is this happening?</p>
  
  <p>And My report_full.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout
    xmlns:android="http://xyz.com"
    android:background="#000000"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;
  
      &lt;RelativeLayout 
      android:background="@drawable/col_bg_top" 
      android:id="@+id/report_title" 
      android:layout_alignParentTop="true" 
      android:layout_width="fill_parent" 
      android:layout_height="50sp"&gt;
  
  
      &lt;/RelativeLayout&gt;
  
      &lt;!-- WHITE LINES --&gt;
      &lt;LinearLayout 
  
      android:layout_width="fill_parent" 
      android:layout_height="1sp" 
      android:orientation="vertical" 
      android:id="@+id/white_line_top" 
      android:layout_below="@+id/report_title"&gt;
      &lt;/LinearLayout&gt;
  
      &lt;!-- MAIN LIST VIEW --&gt;
      &lt;ListView
          android:layout_below="@+id/report_list"
          android:id="@+id/report_list"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_above="@+id/buttons_holder"&gt;
      &lt;/ListView&gt;
  
      &lt;!-- WHITE LINES --&gt;
      &lt;LinearLayout 
      android:background="#9d9d9d"
      android:layout_width="fill_parent" 
      android:layout_height="1sp" 
      android:orientation="vertical" 
      android:id="@+id/white_line_bottom" 
      android:layout_above="@+id/buttons_holder"&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout 
          android:baselineAligned="false"
      android:layout_alignParentBottom="true" 
      android:weightSum="1.0"
      android:orientation="horizontal" 
      android:id="@+id/buttons_holder"  
      android:layout_height="wrap_content" 
      android:layout_width="fill_parent"
      &gt;
  
          &lt;!-- HOME BUTTON --&gt;
          &lt;RelativeLayout 
          android:background="@drawable/col_bg_highlights"
          android:layout_weight="0.33"
          android:layout_width="wrap_content" 
          android:layout_height="62sp" android:padding="3sp"&gt;
  
  
              &lt;TextView 
              android:id="@+id/txt_btn_home" 
              android:textColor="#FFFFFF" 
              android:text="HOME" 
              android:layout_width="wrap_content" 
              android:textSize="9sp" 
              android:layout_height="wrap_content" 
              android:layout_centerHorizontal="true"&gt;
              &lt;/TextView&gt;
  
              &lt;ImageButton 
              android:background="#00000000" 
              android:id="@+id/btn_home" 
              android:scaleType="fitCenter" 
              android:layout_height="42dp" 
              android:layout_width="45sp" 
              android:padding="3sp" 
              android:src="@drawable/home_button" 
              android:layout_below="@+id/txt_btn_home"
              android:layout_centerHorizontal="true"
              &gt;&lt;/ImageButton&gt;
  
          &lt;/RelativeLayout&gt;
  
  &lt;!-- Dividing Line --&gt;
  &lt;RelativeLayout 
  android:layout_width="1sp" 
  android:layout_height="62sp" 
  android:background="#9d9d9d"
  &gt;&lt;/RelativeLayout&gt;
  
          &lt;!-- ACTIVITY BUTTON --&gt;
          &lt;RelativeLayout 
          android:layout_width="wrap_content" 
          android:layout_height="62sp" android:padding="3sp" android:layout_weight="0.34"&gt;
  
              &lt;TextView 
              android:id="@+id/txt_btn_activity" 
              android:textColor="#FFFFFF" 
              android:text="ACTIVITY" 
              android:layout_width="wrap_content" 
              android:textSize="9sp" 
              android:layout_height="wrap_content" 
              android:layout_centerHorizontal="true"&gt;
              &lt;/TextView&gt;
  
              &lt;ImageButton 
              android:background="#00000000" 
              android:id="@+id/btn_activity" 
              android:scaleType="fitCenter" 
              android:layout_height="42dp" 
              android:layout_width="45sp" 
              android:padding="3sp" 
              android:src="@drawable/activity_button" 
              android:layout_below="@+id/txt_btn_activity"
              android:layout_centerHorizontal="true"
              &gt;&lt;/ImageButton&gt;
  
  
          &lt;/RelativeLayout&gt;
  
  &lt;!-- Dividing Line --&gt;
  &lt;RelativeLayout 
  android:layout_width="1sp" 
  android:layout_height="62sp" 
  android:background="#9d9d9d"
  &gt;&lt;/RelativeLayout&gt;
  
          &lt;!-- REPORTS BUTTON --&gt;
          &lt;RelativeLayout 
          android:layout_width="wrap_content" 
          android:layout_height="62sp" android:padding="3sp" android:layout_weight="0.34"&gt;
              &lt;TextView 
              android:id="@+id/txt_btn_report" 
              android:textColor="#FFFFFF" 
              android:text="REPORTS" 
              android:layout_width="wrap_content" 
              android:textSize="9sp" 
              android:layout_height="wrap_content" 
              android:layout_centerHorizontal="true"&gt;
              &lt;/TextView&gt;
  
              &lt;ImageButton 
              android:background="#00000000" 
              android:id="@+id/btn_report" 
              android:scaleType="fitCenter" 
              android:layout_height="42dp" 
              android:layout_width="45sp" 
              android:padding="3sp" 
              android:src="@drawable/report_button" 
              android:layout_below="@+id/txt_btn_report"
              android:layout_centerHorizontal="true"
              &gt;&lt;/ImageButton&gt;
  
          &lt;/RelativeLayout&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>