private fun saveToSettings() { val dataToSave: MutableList<String> = LinkedList() for (item in data) { dataToSave.add( item.getId().toString() + "," + HtmlColors.getColorString(item.getColor()) ) } settings.putList("usercolors", dataToSave) }
Copy the current data to the settings .