title: How to set editText width to one character
body: <p>I'm developing an Android application and now I'm creating a password screen which will have four editText to hold four digits.</p>
  
  <p>This is my <code>password.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/RelativeLayout1"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;EditText
          android:id="@+id/firstNum"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentLeft="true"
          android:layout_alignParentTop="true"
          android:layout_marginLeft="14dp"
          android:layout_marginTop="191dp"
          android:ems="10"
          android:inputType="textPassword"
          android:lines="1"
          android:maxLength="1"
          android:maxLines="1"
          android:minLines="1" &gt;
  
          &lt;requestFocus /&gt;
      &lt;/EditText&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>And this is what I get:</p>
  
  <p><img src="https://i.stack.imgur.com/iLIwx.png" alt="enter image description here"></p>
  
  <p>But the editText is too big.</p>
  
  <p><strong>How can I change its width to fit it to one character only?</strong></p>