title: make a List of HashMap type in recycler view adapter
body: <p>I am using this liabray for swipe gestures. <a href="https://github.com/nikhilpanju/RecyclerViewEnhanced" rel="noreferrer">https://github.com/nikhilpanju/RecyclerViewEnhanced</a>.
  In the MainAdapter.java class recyclerView contains List but i want to replace this to List> type. When i do this, so many errors appear. Kindly guide me how can i do this or suggest me any tutorial to do that. </p>
  
  <p>MainAdapter.java</p>
  
  <pre><code>public class MainAdapter extends RecyclerView.Adapter&lt;MainAdapter.MainViewHolder&gt; {
      LayoutInflater inflater;
      List&lt;RowModel&gt; modelList;
  
      public MainAdapter(Context context, List&lt;RowModel&gt; list) {
          inflater = LayoutInflater.from(context);
          modelList = new ArrayList&lt;&gt;(list);
      }
  
      @Override
      public MainViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
          View view = inflater.inflate(R.layout.recycler_row, parent, false);
          return new MainViewHolder(view);
      }
  
      @Override
      public void onBindViewHolder(MainViewHolder holder, int position) {
          holder.bindData(modelList.get(position));
      }
  
      @Override
      public int getItemCount() {
          return modelList.size();
      }
  
      class MainViewHolder extends RecyclerView.ViewHolder {
  
          TextView mainText, subText;
  
          public MainViewHolder(View itemView) {
              super(itemView);
              mainText = (TextView) itemView.findViewById(R.id.mainText);
              subText = (TextView) itemView.findViewById(R.id.subText);
          }
  
          public void bindData(RowModel rowModel) {
              mainText.setText(rowModel.getMainText());
              subText.setText(rowModel.getSubText());
          }
      }
  }
  </code></pre>
  
  <p>Activity:</p>
  
  <pre><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_admin_panel);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
  
          unclickableRows = new ArrayList&lt;&gt;();
          unswipeableRows = new ArrayList&lt;&gt;();
          dialogItems = new String[25];
          for (int i = 0; i &lt; 25; i++) {
              dialogItems[i] = String.valueOf(i + 1);
          }
  
          mRecyclerView = (RecyclerView) findViewById(R.id.recyclerView);
          mAdapter = new MainAdapter(this, getData());
          mRecyclerView.setAdapter(mAdapter);
          mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
  
          onTouchListener = new RecyclerTouchListener(this, mRecyclerView);
          onTouchListener
                  .setIndependentViews(R.id.rowButton)
                  .setViewsToFade(R.id.rowButton)
                  .setClickable(new RecyclerTouchListener.OnRowClickListener() {
                      @Override
                      public void onRowClicked(int position) {
                          util.shortToast(getApplicationContext(), "Row " + (position + 1) + " clicked!");
                      }
  
                      @Override
                      public void onIndependentViewClicked(int independentViewID, int position) {
                          util.shortToast(getApplicationContext(), "Button in row " + (position + 1) + " clicked!");
                      }
                  })
                  .setSwipeOptionViews(R.id.add, R.id.edit, R.id.change)
                  .setSwipeable(R.id.rowFG, R.id.rowBG, new RecyclerTouchListener.OnSwipeOptionsClickListener() {
                      @Override
                      public void onSwipeOptionClicked(int viewID, int position) {
                          String message = "";
                          if (viewID == R.id.add) {
                              message += "Add";
                          } else if (viewID == R.id.edit) {
                              message += "Edit";
                          } else if (viewID == R.id.change) {
                              message += "Change";
                          }
                          message += " clicked for row " + (position + 1);
                          util.shortToast(getApplicationContext(), message);
                      }
                  });
          mRecyclerView.addOnItemTouchListener(onTouchListener);
  
  
  
  
  
          // Detect touched area
          detector = new Swipe(this,this);
  
          db = new DB(getApplicationContext());
  
          Bundle bundle = getIntent().getExtras();
          if(bundle != null) {
              String id = bundle.getString("id");
              Toast.makeText(this, "Welcome " + db.getUsernameById(id), Toast.LENGTH_LONG).show();
          }
  
          //get references of layout
  //        adapter = new AdapterUsers(this, R.layout.textview_users, arrayList);
  //        listView = (ListView) findViewById(R.id.users);
  //        listView.setAdapter(adapter);
  //
  //        showAllUsers();
      }
  
      public void showAllUsers() {
          try {
              Cursor cursor = db.selectAllUsers();
              cursor.moveToFirst();
              adapter.clear();
              if (cursor.getCount() == 0) {
                  Toast.makeText(this, "Empty user list", Toast.LENGTH_SHORT).show();
              } else {
                  for (int i = 0; i &lt; cursor.getCount(); i++) {
                      HashMap&lt;String, Object&gt; hm = new HashMap&lt;String, Object&gt;();
                      hm.put(ID, cursor.getString(cursor.getColumnIndex(db.ID_USER)));
                      hm.put(USERNAME, cursor.getString(cursor.getColumnIndex(db.NAME_USER)));
                      arrayList.add(hm);
                      cursor.moveToNext();
                  }
              }
          } catch (Exception e) {
              Log.d("Show users", " failed due to " + e.getMessage());
          }
      }
  
  
      // Swipe interface
      @Override
      public void onSwipe(int direction) {
          String str = "";
  
          switch (direction) {
  
              case Swipe.SWIPE_RIGHT :
                  listView.setOnClickListener(new View.OnClickListener() {
                      public void onClick(View arg0) {
                          //deleteUser(id);
                          Toast.makeText(AdminPanel.this, "user deleted", Toast.LENGTH_LONG).show();
                      }
                  });
                  str = "Swipe Right";
                  break;
              case Swipe.SWIPE_LEFT :  str = "Swipe Left";
                  break;
              case Swipe.SWIPE_DOWN :  str = "Swipe Down";
                  break;
              case Swipe.SWIPE_UP :    str = "Swipe Up";
                  break;
  
          }
          Toast.makeText(this, str, Toast.LENGTH_SHORT).show();
      }
  
      @Override
      public void onDoubleTap() {
          Toast.makeText(this, "Double Tap", Toast.LENGTH_SHORT).show();
      }
  
  
      @Override
      public boolean dispatchTouchEvent(MotionEvent ev) {
          if (touchListener != null) touchListener.getTouchCoordinates(ev);
          return super.dispatchTouchEvent(ev);
      }
  
      @Override
      public void setOnActivityTouchListener(OnActivityTouchListener listener) {
          this.touchListener = listener;
      }
  
      private List&lt;RowModel&gt; getData() {
          List&lt;RowModel&gt; list = new ArrayList&lt;&gt;(25);
          for (int i = 0; i &lt; 25; i++) {
              list.add(new RowModel("Row " + (i + 1), "Some Text... "));
          }
          return list;
      }
  
  }
  </code></pre>