title: How to replace view programmatically in Android?
body: <p>I have a complex view, containing several subviews, like text views and image views.
  I'd like to replace one of the image views with another (derived) image view (the other one support loading images in the background).</p>
  
  <p><strong>How can I replace the original image view with a new one?</strong></p>
  
  <p>The solution I currently have is just copy pasting the whole XML layout and do the replace in the new XML - Very bad to duplicate and not reuse things :(</p>