title: Cannot resolve method 'get(java.lang.String)'
body: <p>How can I fetch position for row in recyclerView and solve the problem of get</p>
  
  <pre><code>public class MyListAdapter extends RecyclerView.Adapter&lt;MyListAdapter.MyViewHolder&gt;  {
  
  
  
  
          private String[] listOfItems;
  
      public MyListAdapter(String[] listOfItems){
          this.listOfItems = listOfItems;
  
      }
  
      @Override
      public MyViewHolder onCreateViewHolder( ViewGroup parent, int i) {
          Boolean attachViewImmediatelyToParent = false;
          View singleItemLayout = LayoutInflater.from(parent.getContext()).inflate(R.layout.row,parent,attachViewImmediatelyToParent);
          MyViewHolder myViewHolder = new MyViewHolder(singleItemLayout);
  
  
          return myViewHolder;
      }
  
  
  
  
      @Override
      public void onBindViewHolder(final MyViewHolder holder, int position) {
          holder.textShow.setText(listOfItems[position]);
          holder.textShow.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
  Resolve the problem of get in Toast
                  Toast.makeText(holder.textShow.getContext(), "you pressed the " + listOfItems.get(holder.getLayoutPosition()+" item"), Toast.LENGTH_SHORT).show();
  Resolve the problem of getting in Toast
              }
          });
  
  
  
      }
  
  
      @Override
      public int getItemCount() {
          return  listOfItems.length;
      }
  
  
  
  
      class MyViewHolder extends RecyclerView.ViewHolder{
          TextView textShow;
          public MyViewHolder(View itemView) {
              super(itemView);
              textShow = (TextView) itemView.findViewById(R.id.tvphrase);
          }
      }
  
  
  
  
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/Wkfal.png" alt="enter image description here"></p>