@wang16 Sorry for lately update for this patch, I have investigated the implementation of using xml layout, and found lots of limitation and complexity.
1. Need to reflect the xml layout for further customization. (for shared mode different context usage)
2. Need to emulate all child ImageView, and set each one an in-memory image.
3. Each child ImageView need to set it's scale type dynamically.
So the code will not become simplified, even more complexed caused by the layout inflection.