title: How to add two tables in one RecyclerView with different colour values
body: <p><a href="https://i.stack.imgur.com/znpDg.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/znpDg.png" alt="Sample Image"></a><br>
  I want to make above type of RecyclerView (in my case). In above sample pic, the expenses show in red colours with zebra lines and income shows in green colours. I've write code for expense table values and successfully shown in RecyclerView. Now I want to show income from income table and make view same as sample pic. kindly help.</p>
  
  <p>RecyclerView with expense values: </p>
  
  <pre><code>arrayListExpense = new ArrayList&lt;&gt;();
          AdapterViewItems adapter = new AdapterViewItems(MainActivity.this, arrayListExpense);
          recyclerView = (RecyclerView) findViewById(R.id.view_item_recycle_view);
          RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(getApplicationContext());
          recyclerView.setLayoutManager(mLayoutManager);
          recyclerView.setAdapter(adapter);
  
  Cursor cursor = db.selectExpense();
   cursor.moveToFirst();
          if (cursor.getCount() == 0) {
              Toast.makeText(this, "Empty list", Toast.LENGTH_SHORT).show();
          } else {
              for (int i = 0; i &lt; cursor.getCount(); i++) {
                  HashMap&lt;String, Object&gt; hm = new HashMap&lt;&gt;();
                  hm.put(ID_EXPENSE, cursor.getString(cursor.getColumnIndex(ID_EXPENSE)));
                  hm.put(NAME_EXPENSE, cursor.getString(cursor.getColumnIndex(NAME_EXPENSE)));
  
                  long valueExpense = cursor.getLong(cursor.getColumnIndex(VALUE_EXPENSE));
                  showExpense(valueExpense);
  
                  hm.put(VALUE_EXPENSE, String.valueOf(valueExpense));
                  hm.put(DATE_EXPENSE, Utility.dateFormat(cursor.getLong(cursor.getColumnIndex(DATE_EXPENSE))));
                  String id = cursor.getString(cursor.getColumnIndex(TYPE_ID_EXPENSE));
                  hm.put("type", db.selectTypeById(id));
                  arrayListExpense.add(hm);
                  cursor.moveToNext();
              }
              cursor.close();
          }
  </code></pre>
  
  <p>Database:</p>
  
  <pre><code>Cursor selectExpense() {
          Cursor cursor = null;
          try {
              SQLiteDatabase db = this.getWritableDatabase();
              cursor = db.rawQuery("SELECT " + ID_EXPENSE + "," + NAME_EXPENSE + "," + VALUE_EXPENSE
                      + "," + DATE_EXPENSE + "," + TYPE_ID_EXPENSE + " FROM " + TABLE_EXPENSE
                      + " ORDER BY " + DATE_EXPENSE + " DESC", null);
          } catch (Exception e) {
              Log.d("selectExpenses", " error " + e.getMessage());
          }
  
          return cursor;
      }
  </code></pre>