I have a settings fragment which builds its list of Preference
objects dynamically and adds them to the PreferenceScreen
object. The list is quite big, roughly 100 items. I want each of the preferences to have an icon.
The problem that I am having is that I often run into out of memory issues because Preference.setIcon
allocates the memory for the drawable right as you call it.
I would like the icon not to be shown, until the preference is actually shown. Is this possible?