I have a Recyclerview which has checkboxes which when clicked saves the status of checkboxes and their position in the Recyclerview layout in the hashmap.I want to send the hashmap to another activity.Is it possible to save hashmap to SharedPreferences.
Code:
if(checkBox.isChecked()){
boolean check=true;
clicked_position=getAdapterPosition();
i=new Integer(clicked_position);
hashMap.put(i, check);}
if(hashMap!=null){
SharedPreferences selectedplaces=context.getSharedPreferences("selectedplaces",Context.MODE_PRIVATE);
SharedPreferences.Editor editor=selectedplaces.edit();
}