title: Android does not respect the android:layout_height in xml
body: <p>I am creating a customer view that extends View and include this view in the layout xml file. However it looks like the system does not respect the height I defined in the layout xml file. (The view is put in a relativeLayout)</p>
  
  <p>The xml file looks like this:</p>
  
  <pre><code>&lt;com.example.viewtest.MyView
  android:layout_width="match_parent"
  android:layout_height="140dp"
  /&gt;
  </code></pre>
  
  <p>However after I run the app on the phone, this view is always given a larger height value. I searched the Android development guide and I am aware of that system does not always respect the dimensions defined. </p>
  
  <p>However what I am now confused at is that the total drawing in the view is less than 140 height, and when i debug the code, I found the getHeight() and getMeasuredHeight() both returns the larger value, which in my example, is 195.</p>
  
  <p>I searched in stackoverflow and google but I did not get any clues about this? Can anybody help me on this? I appreciate it very much!</p>
  
  <p>Thanks,
  Qian</p>