title: Get all item from cursor in android
body: <p>I use this code to get the item from cursor, but it just return one item on my list. So, how can I get all items to my list, this is my code?</p>
  
  <pre><code>class MyAdapter extends SimpleCursorAdapter
  {
      private Context context;
  
      public MyAdapter(Context context, int layout, Cursor c, String[] from, int[] to)
      {
          super(context, layout, c, from, to);
          this.context = context;
  
      }
      public View getView(int position, View convertView, ViewGroup parent){
          Cursor cursor = getCursor();
  
          LayoutInflater inflater = ((Activity) context).getLayoutInflater();         
          View v = inflater.inflate(R.layout.sbooks_row, null);           
          TextView title = (TextView)findViewById(R.id.title);
          if(title != null){
              int index = cursor.getColumnIndex(SBooksDbAdapter.KEY_TITLE);
              String type = cursor.getString(index);
              title.setText(type);
          }
  
          TextView lyrics = (TextView)findViewById(R.id.lyrics);
          if(lyrics != null){
              int index = cursor.getColumnIndex(SBooksDbAdapter.KEY_LYRICS);
              String type = cursor.getString(index);
              lyrics.setText(type);
          }
  
          ImageView im = (ImageView)findViewById(R.id.icon);
          if(im!=null){
              int index = cursor.getColumnIndex(SBooksDbAdapter.KEY_FAVORITE);
              int type = cursor.getInt(index);
              if(type==1){
                  im.setImageResource(android.R.drawable.btn_star_big_on);
              }
              else{
                  im.setImageResource(android.R.drawable.btn_star_big_off);
              }
          }
  
          return v;
      }
  </code></pre>