When developing an application, I encountered such a problem. I have a ListView
. It is necessary that when you click on an item, this item changes its appearance (text color), and when you click again, it returns to its normal state. The difficulty is that it should be saved, i.e. When restarting the application, the appearance of the items should be the same as when closing.
PS List items are pulled from the base, if it helps something.