title: How do i display my data when overriding getview
body: <p>Ive been learning about the getview . But i cant get it to display the data in my listview. Can anyone help code is below</p>
  
  <pre><code>//public class OrderProductSearch extends Activity {
  public class OrderProductSearch extends Activity {
   ArrayList&lt;HashMap&lt;String,String&gt;&gt; list = new ArrayList&lt;HashMap&lt;String,String&gt;&gt;();
      HashMap&lt;String,String&gt; item = new HashMap&lt;String,String&gt;();
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) { 
      super.onCreate(savedInstanceState); 
      try{
          setContentView(R.layout.orderproducts);
      }
      catch (Exception e) {
          //
          String shaw="";
          shaw = e.getMessage();
      }
  
      //Create view of the list where content will be stored
      final ListView listContent = (ListView)findViewById(R.id.orderproductlistview); 
  
      //Set for fast scrolling 
      listContent.setFastScrollEnabled(true);
  
      //Create instance of the database
      final DbAdapter db = new DbAdapter(this); 
  
      //Open the Database and read from it
      db.openToRead();
  
      //Routine to call all product sub groups from the database
      final Cursor cursor = db.getAllSubGroupProduct();
     //Manages the cursor
      startManagingCursor(cursor);
      int i=0;
      cursor.moveToFirst();
      while (cursor.getPosition() &lt; cursor.getCount()) {
           item.put("ProdName",cursor.getString(2));
           item.put("ProdSize", cursor.getString(3));
           item.put("ProdPack",cursor.getString(4));
           item.put("OrdQty","0");
  
           //list.add(item);
           list.add(i, item);
           item = new HashMap&lt;String,String&gt;();   
           cursor.moveToNext();
          i = i + 1;
  
      }
  
      String[] from = new String[] {"ProdName", "ProdSize", "ProdPack", "OrdQty"};
  
      int[] to = new int[] { R.id.productlinerow, R.id.productlinerow2, R.id.productlinerow3, R.id.productlinerow4};
      //SimpleAdapter notes = new SimpleAdapter(OrderProductSearch.this,list,R.layout.productlinerow,from,to);        
      NewAdapter notes = new NewAdapter(OrderProductSearch.this,list,R.layout.productlinerow,from,to);
  
  
      listContent.setAdapter(notes);
  
  
      //Close the database
      db.close();     
  
  
          }
  
  class NewAdapter extends SimpleAdapter{
      int resource;
      Context cxt;
      private Context context;
      List&lt;? extends Map&lt;String, ?&gt;&gt; DataList;
  
      public NewAdapter(Context context, List&lt;? extends Map&lt;String, ?&gt;&gt; data,
              int _resource, String[] from, int[] to) {
          super(context, data, _resource, from, to);
          resource = _resource;
          this.context = context;
          DataList = data;
          // TODO Auto-generated constructor stub
      }
  
      public View getView(int position, View convertView, ViewGroup parent) 
      {            
          View v = convertView;
  
             if (v == null) {
                  LayoutInflater inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                  v = inflater.inflate(R.layout.productlinerow, null);
             }
  
      //       TextView bTitle = (TextView) v.findViewById(R.id.productlinerow);
    //         bTitle.setText(DataList[position,1][1].toString());
  
          return v;
              }   
  
  }
  
  
  
  
  
  
   }
  </code></pre>