title: get the data when an Item is clicked in recyclerview
body: <p>How to access data after clicking an Item of <code>RecyclerView</code>. What I need is the logic behind on how to get the expanded Items from the database.
  Currently for adapter using <code>CursorRecyclerViewAdapter</code> to get data from database <a href="https://gist.github.com/skyfishjy/443b7448f59be978bc59" rel="nofollow">https://gist.github.com/skyfishjy/443b7448f59be978bc59</a></p>
  
  <p>RemindersAdapter.java</p>
  
  <pre><code> public class RemindersAdapter extends     CursorRecyclerViewAdapter&lt;RemindersAdapter.ItemViewHolder&gt; {
     private final LayoutInflater inflater;
     List&lt;ListInfo&gt; data = Collections.emptyList();
     private Context context;
     ListInfo temporaryBucket;
  public RemindersAdapter(Context context, Cursor cursor){
      super(context, cursor);
      inflater = LayoutInflater.from(context);
      this.context = context;
  }
  
  @Override
  public ItemViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
      View view = inflater.inflate(R.layout.reminder_item, parent, false);
  
      ItemViewHolder holder = new ItemViewHolder(view);
      temporaryBucket = new ListInfo();
  
      return holder;
  }
  
  @Override
  public void onBindViewHolder(ItemViewHolder viewHolder, Cursor cursor) {
          int     id      = cursor.getInt(cursor.getColumnIndex(MyDBHandler.COLUMN_ID));
          String  title   = cursor.getString(cursor.getColumnIndex(MyDBHandler.COLUMN_TITLE_REMINDER));
          String  desc    = cursor.getString(cursor.getColumnIndex(MyDBHandler.COLUMN_DESC_REMINDER));
          String  date    = cursor.getString(cursor.getColumnIndex(MyDBHandler.COLUMN_DATE_REMINDER));
  
          viewHolder.title.setText(title);
  
  }
  
  class ItemViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
      TextView title;
  
      public ItemViewHolder(View itemView) {
          super(itemView);
          title = (TextView) itemView.findViewById(R.id.reminderTitle);
  
          itemView.setOnClickListener(this);
  
      }
  
      @Override
      public void onClick(View v) {
          int position = getLayoutPosition();
  
          Toast.makeText(context, "Clicked", Toast.LENGTH_SHORT).show();
      }
    }
  }
  </code></pre>
  
  <p>MyDBHandler.java</p>
  
  <pre><code> public class MyDBHandler extends SQLiteOpenHelper{
    private static final int DATABASE_VERSION = 7;
    private static final String DATABASE_NAME = "paroah.db";
    public static final String TABLE_REMINDER = "reminders";
    public static final  String COLUMN_ID = "_id";
    public static final  String COLUMN_TITLE_REMINDER = "title";
    public static final  String COLUMN_DESC_REMINDER = "desc";
    public static final  String COLUMN_DATE_REMINDER = "date_created";
    private Cursor allReminders;
  public MyDBHandler(Context context) {
      super(context, DATABASE_NAME, null, DATABASE_VERSION);
  }
  
  
  @Override
  public void onCreate(SQLiteDatabase db) {
      String query = " CREATE TABLE "
              +TABLE_REMINDER+ "(" +
              COLUMN_ID +" INTEGER PRIMARY KEY AUTOINCREMENT,"+
              COLUMN_TITLE_REMINDER + " TEXT ,"+
              COLUMN_DESC_REMINDER + " TEXT ,"+
              COLUMN_DATE_REMINDER + " TEXT "+
              ");";
  
      db.execSQL(query);
  }
  
  @Override
  public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
      Log.d("aoi", "Upgrading database from version " + oldVersion + " to "
              + newVersion + ", which will destroy all old data");
      try {
          db.execSQL("DROP TABLE IF EXISTS "+TABLE_REMINDER);
          onCreate(db);
  
      } catch (SQLException e) {
          Log.d("aoi",  "getting exception "
                  + e.getLocalizedMessage().toString());
      }
  }
  
  public void addReminder(ListInfo reminder ){
      ContentValues values = new ContentValues();
      values.put(COLUMN_TITLE_REMINDER, reminder.getTitle());
      values.put(COLUMN_DESC_REMINDER, reminder.getDesc());
      values.put(COLUMN_DATE_REMINDER, reminder.getDate());
  
      SQLiteDatabase db = getWritableDatabase();
  
      db.insert(TABLE_REMINDER, null, values);
      db.close();
  }
  
  public Cursor getAllReminders() {
  
      SQLiteDatabase db = getWritableDatabase();
  
      String query = "SELECT * FROM "+TABLE_REMINDER;
  
      allReminders = db.rawQuery(query, null);
  
      return allReminders;
  }
  
  }
  </code></pre>
  
  <p>In my <code>onBindViewHolder</code> I'm getting "id, title, desc and date" but only showing the title which when clicked will show the desc and date. For testing just showing a Toast for now on click of item. </p>