title: Android How to Remove ImageView from RelativeLayout
body: <p>I am trying to figure out what is the proper way to remove an ImageView from a RelativeLayout is? I have tried </p>
  
  <pre><code>relativeLayout.removeView(someImageView)
  </code></pre>
  
  <p>but this causes some issues on certain phones. See this other post here for stacktrace. <a href="https://stackoverflow.com/questions/12614272/removing-imageview-causes-crash-on-certain-phones">Removing ImageView causes crash on certain phones</a></p>
  
  <p>I really don't want to do the solution where you just make it appear gone because that is basically leaking that ImageView in memory right?</p>
  
  <pre><code>someImageView.setVisibility(View.GONE);
  </code></pre>
  
  <p>Any other ideas would be much appreciated.</p>