title: Moving a view using bias according to height of keyboard [Constraint layout]
body: <p>I am making an app in which I have decided to use Constraint layout. In the proposed design there is a button in the bottom right corner and it needs to move up with the keyboard when it appears as shown:</p>
  
  <p><a href="https://i.stack.imgur.com/Je0vZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Je0vZ.png" alt="enter image description here"></a></p>
  
  <p>I am able to move the button up by programattically setting its vertical bias:</p>
  
  <pre><code>ConstraintSet constraintSet = new ConstraintSet();
  constraintSet.clone(constraintLayout);
  constraintSet.setVerticalBias(buttonNext.getId(), (float) 0);
  constraintSet.applyTo(constraintLayout);
  </code></pre>
  
  <p>But I want to move the button exactly above the keyboard as shown in the above figure. Upon searching I have found some solutions to find the height of the keyboard. But I don't know what calculation am I supposed to do between the bias and keyboard height. I am not sure about the unit which used for bias (percentage maybe? because in editor its value is from 1 - 100) and the keyboard height will be in dps. </p>
  
  <p>If anyone can help me with my logic or propose some other solution to create the above shown layout, it would be highly appreciated. </p>