title: Format credit card in edit text in android
body: <p>How to make <code>EditText</code> accept input in format:</p>
  
  <pre><code>4digit 4digit 4digit 4digit 
  </code></pre>
  
  <p>I tried <a href="https://stackoverflow.com/questions/5947674/custom-format-edit-text-input-android-to-accept-credit-card-number">Custom format edit text input android to accept credit card number</a>, but unfortunately I was unable to delete the spaces. Whenever there is a space, I could not to delete it. Please help me in finding out the issue.</p>