remember last positions for folders and drawables
use the type of T, which is always accessible (instead of defaultValue, which may be null)