title: How can I replace newline button with done button in an EditText
body: <p>I am trying to make my EditText instead of using <code>newline</code> button to display a <code>Done</code> button. </p>
  
  <p>Typical problem with many questions on SO, however most recommend using <code>singleLine="true"</code> which is deprecated. </p>
  
  <p>Here is my XML that displays the EditText:</p>
  
  <pre><code>// Other XML
  &lt;EditText
          android:id="@+id/name"
          android:layout_width="250dp"
          android:layout_height="wrap_content"
          android:digits="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_"
          android:hint="@string/character_name_hint"
          android:imeOptions="actionDone"
          android:maxLines="1"
          android:inputType="text"
          android:textStyle="italic" /&gt;
   // Rest of the XML...
  </code></pre>
  
  <p>However using <code>android:imeOptions="actionDone"</code> doesn't work, neither is setting it programmatically <code>name.setImeOptions(EditorInfo.IME_ACTION_DONE);</code> I have tried it on two different emulators and a live device, API levels ranging from 21 to 26, I have used every single combination of <code>maxLines</code>, <code>inputType</code> and <code>imeOptions</code> to no avail.</p>
  
  <p>The button will simply not change to "Done". However using <code>android:singleLine="true"</code> will instantly fix that....</p>
  
  <p>For now I don't care about what it needs to be done after clicking, I simply want to change button to "Done"</p>