title: Prevent EditText from allowing more characters to be typed out based on rendering of Fonts
body: <p>I have an item in a <code>RecyclerView</code> that gets rendered based on whether or not it has multiple words in it. If the item has multiple words, I assign a smaller typeface, if not then I assign a different typeface with a larger textsize.</p>
  <h1><strong>Problem</strong>:</h1>
  <p>I want the <code>EditText</code> to detect if the rendering for any given <code>TypeFace</code> is going to exceed a certain amount, if so then prevent the user from typing out anymore characters.</p>
  <p><em><strong>Smaller TypeFace</strong></em>:</p>
  <ul>
  <li>If the rendering exceeds 3 lines, do not let the user type in anymore characters</li>
  </ul>
  <p><em><strong>Larger TypeFace</strong></em>:</p>
  <ul>
  <li>If the rendering exceeds 1 line, do not let the user type in anymore characters.</li>
  </ul>
  <h1><strong>Sample Drawing</strong> (Just to be clear the EditText is not inside this layout):</h1>
  <p><strong>Smaller TypeFace</strong></p>
  <p><a href="https://i.stack.imgur.com/0oWQD.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0oWQD.png" alt="enter image description here" /></a></p>
  <p><strong>Larger TypeFace</strong></p>
  <p><a href="https://i.stack.imgur.com/lbfU4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/lbfU4.png" alt="enter image description here" /></a></p>
  <h1><strong>Initial Hunch</strong>:</h1>
  <p>I am thinking that I create a custom <code>EditText</code> class and in that class get the <code>TypeFace</code> determine which kind it is and try to pre-render it. If the rendering exceeds the restrictions prevent anymore characters from being typed out.</p>
  <p>Any thoughts on this?</p>
  <p>Any ideas for implementation?</p>
  <p><strong>Edit: I have a solution will be posting it up shortly</strong></p>