title: Change height of view programmatically with a float value (Android)
body: <p>So what I have is just a simple view that is defined in the xml and what I want to do is using the onScroll gesture, change that view's height. Only problem is LayoutParams expects integer values, whereas the change in distance provided by onScroll is a float value. How can I resize this height without losing the precision of the float?</p>
  
  <p>Here is what I have in the onScroll method:</p>
  
  <pre><code>int newHeight = mTopView.getHeight() + (int)distanceY;
  if (newHeight &lt;= maxHeight) {
      mTopView.setLayoutParams(new LinearLayout.LayoutParams(mTopView.getWidth(), newHeight));
  }
  </code></pre>