I wonder if this is the recommended way of dynamically loading an icon. I'd thought xml and code are better separated.