title: Get Position data from Item in RecyclerView
body: <p>I recently migrated from ListView to RecyclerView...
  Everything seems fine except for that I don't know how to get the Data from an RecyclerView Item...
  In ListView Item OnClick, I previously used <code>getItemAtPosition</code> but it isn't there in RecyclerView...</p>
  
  <p>here is the relevant part of the Code... - 
  MainActivity.java </p>
  
  <pre><code>private SDKP mSelectedPackage;
  RecyclerView mRecyclerView;
  
  mRecyclerView.addOnItemTouchListener(new RecyclerItemClickListener(this, new RecyclerItemClickListener.OnItemClickListener() {
              @Override
              public void onItemClick(View view, int position) {
              //I'm STUCK HERE!
               mSelectedPackage = (SDKPackage) mRecyclerView.getItemAtPosition(position);
                      openContextMenu(view);
  
    /*Toast.makeText(MainActivity.this, "Card at " + position + " is clicked", Toast.LENGTH_SHORT).show();*/
              }
          }));
  
  
  @Override
      public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo)
      {
          mSelectedPackage.inflateMenu(menu);
          super.onCreateContextMenu(menu, v, menuInfo);
      } 
  
      @Override
      public boolean onContextItemSelected(MenuItem item)
      {
          return mSelectedPackage.onMenuClick(this, item);
      }
  </code></pre>
  
  <p>here's the inflateMenu(ContextMenu menu) method - </p>
  
  <pre><code>public void inflateMenu(ContextMenu menu)
      {
          menu.setHeaderTitle(getPackageName());
          if (isDownloading())
          {
              menu.add(Menu.NONE, 256, Menu.NONE, "Cancel download");
          }
          else if (isInstalled())
          {
              menu.add(Menu.NONE, 257, Menu.NONE, "Uninstall");
          }
          else
          {
              int i = 0;
              for (SDKA archive : archives)
              {
                  menu.add(Menu.NONE, i++, Menu.NONE, archive.getArchiveName());
              }
          }
      }
  
      public boolean onMenuClick(Activity parent, MenuItem item)
      {
          if (item.getItemId() &gt;= 256)
              uninstall();
          else
          {
              SDKA archive = archives.get(item.getItemId());
              if (archive != null)
              {
                  archive.onClick(parent);
              }
          }
          return true;
      }
  </code></pre>
  
  <p>When I used ListView I used - </p>
  
  <pre><code>mListView.setOnItemClickListener(new AdapterView.OnItemClickListener()
              {
                  @Override
                  public void onItemClick(AdapterView&lt;?&gt; adapter, View view, int position, long arg)
                  {
                      mSelectedPackage = (SDKP) mPackageList.getItemAtPosition(position);
                      openContextMenu(view);
                  }
              });
  </code></pre>