Does anyone know if SharedPreferences are enlarging their size by commiting modifications of key-value pair?
For example – I’m using only one key-value pair of SharedPreferences in my Service class
and I’m wondering if that XML file would increase its size everytime my method does something with editor (commit modifications)
or it just replaces corresponding XML tag with new value everytime instead of adding new XML tag for new value (and so keeping file size the same)?
If you add new key/value, then of course the size of file will increase. But if you update an existing pair then it will override the old pair and may keep the file size same depending on the size of new value.