title: Null Pointer exception in the getView method of BaseAdapter
body: <p>I getting the null pointer exception in getView() of my CustomAdapter here is the complete code.</p>
  
  <pre><code>private class CustomAdapter extends BaseAdapter
  {
      LayoutInflater viewInflator;
  
      public CustomAdapter(Context context)
      {
          viewInflator = LayoutInflater.from(context);
      }
  
      public int getCount() 
      {
          return weekDate.size();
      }
  
      public Object getItem(int arg0) 
      {
          return arg0;
      }
  
      public long getItemId(int arg0) 
      {
          return arg0;
      }
  
      public View getView(int position, View createView, ViewGroup viewGroup) 
      {
          ViewHolder holder;
  
          if(viewInflator != null)
              holder = (ViewHolder) createView.getTag();
          else
          {
              createView = viewInflator.inflate(R.layout.vehicle_detail_listview, null);
              holder = new ViewHolder();
              holder.setTextView( (TextView) createView.findViewById(R.id.listContent) );
              createView.setTag(holder);
          }
  
          holder.getTextView().setText(weekDate.get(position));
  
          return createView;
      }
  
      private class ViewHolder
      {
          private TextView textView;
  
          public TextView getTextView() 
          {
              return textView;
          }
  
          public void setTextView(TextView textView) 
          {
              this.textView = textView;
          }
      }
  }
  </code></pre>
  
  <p>now the null pointer exception arise at line <code>holder = (ViewHolder) createView.getTag();</code></p>
  
  <p>there is two layout main &amp; vehicle_detail_listview. </p>
  
  <ul>
  <li><p>Main layout : contain the one textView &amp; listView</p></li>
  <li><p>vehicle_detail_listview :  one text view</p></li>
  </ul>
  
  <p>Now from the onCreate() of the Activity I am writing this :</p>
  
  <pre><code>    CustomAdapter adapter = new CustomAdapter(this);
      listView.setAdapter(adapter);
  </code></pre>
  
  <p>Please let me know where i am doing wrong.</p>
  
  <p>Thanks in advance</p>