I made SQL database with all functions. In my activity with RecyclerView (Recycler is listing all items in SQL database) I made a function to check (setBackgroundColor) selected item after I enter specific value for that item.
To be more clear:
if(foodList.get(position).getGram() > 0) {
holder.row_linearlayout.setBackgroundColor(ContextCompat.getColor(context, R.color.colorAccent));
}else{
holder.row_linearlayout.setBackgroundColor(ContextCompat.getColor(context, R.color.white));
}
So, if I enter specific value (with EditText) that item will change background color.
The problem is that somehow in second activity I need to pass ONLY selected items (items with changed background color) in RecyclerView. And I dont have logic or idea how to do that. Any advice would be helpfull.
Let me know if you need some more of my code to better understand my question.