title: Custom View Not Showing When Dynamically Added
body: <p>At a loss here. Searched far and wide and can't find an answer to this question...</p>
  
  <p>I have an XML layout where I have a relative layout that I am using as a place holder for different views.</p>
  
  <pre><code>&lt;RelativeLayout
      android:id="@+id/relVariableLayoutPlaceHolder"
  
      android:layout_width="match_parent"
      android:layout_height="0dp"
      android:layout_weight="1"
  
      android:background="@color/white"
      &gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>In my activity, I have a button for the user to press and when they press it, I want the custom <code>ClockView</code> to be created and dynamically added. Note that the <code>_variableLayout</code> is setting perfectly in the <code>onCreate</code> method:</p>
  
  <pre><code>public void onStartTimeClick(View view)
  {
      //Clean up any left over views
      _variableLayout.removeAllViews();
  
      //Add clock view
      ClockView clockView = new ClockView(_context);
      _variableLayout.addView(clockView);
  }
  </code></pre>
  
  <p>Problem is that when the button is pressed, nothing happens on the screen. I can, however see it when I tap a <code>TextView</code> that is also on the screen.</p>
  
  <p>I uploaded some images here of the before and after clicking the <code>TextView</code>:
  <a href="http://imgur.com/a/9lebv" rel="noreferrer">http://imgur.com/a/9lebv</a></p>
  
  <p>I would imagine this has something to do with the screen not being refreshed after the clock view is drawn but I have tried every combination of <code>invalidate()</code> and <code>requestLayout()</code> I can think of. Any ideas?</p>