title: Adding a new CheckBox and a editText views, when the user taps the Done on the keypad in android?
body: <p><strong>I am new to android development</strong>,<br />
  What i am trying to achieve is,</p>
  <p>When the <strong>user clicks the DONE button via the on-screen keyboard(Soft input method)</strong>, the existing default editText should turn into a checkBox and also again creating an editText so that the user can enter some data again.<br />
  These <strong>I can able to do this with creating a button and pressing it</strong> but <strong>I don't want a button</strong>, I <strong>want the on-Screen keyboard interactions such as DONE button</strong>.</p>
  <p>first, i tried it with onKeyListener but it doesn't work on the soft keyboard(mobile phone's) instead it worked on the hardware keyboard such as the laptop keyboard.</p>
  <p>and then i can also able to do the above-mentioned function via the On-Screen Keyboard using the <strong>onEditerActionListener()</strong>, <strong>but only once I can do this and after that</strong>, the <strong>DONE button disappears from the on-Screen keyboard, the ENTER button replaces the DONE button</strong></p>
  <p>When for the first i try to enter some data into the editText the DONE button is available and after the ENTER BUTTON replaces it.</p>
  <p><strong>1) is there any way to stop the ENTER button from replacing the DONE button on the on_Screen keyboard?<br />
  2) OR is there any way to also give the functionality to the enter key also?</strong></p>
  <h4>XML CODE,</h4>
  <pre><code>    &lt;EditText
          android:id=&quot;@+id/defaultEditText&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;wrap_content&quot;
          android:layout_marginStart=&quot;32dp&quot;
          android:layout_marginTop=&quot;32dp&quot;
          android:layout_marginEnd=&quot;32dp&quot;
          android:inputType=&quot;text&quot;
          android:textSize=&quot;20sp&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toTopOf=&quot;parent&quot;
          /&gt;
  </code></pre>
  <h4>ANDROID CODE,</h4>
  <pre><code>    this.constraintLayout = findViewById(R.id.constraintLayout);
      this.defaultEditText = findViewById(R.id.defaultEditText);
  
      defaultEditText.setOnEditorActionListener( new TextView.OnEditorActionListener() {
      @Override
      public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
  
          if (actionId == EditorInfo.IME_ACTION_DONE) {
  
             
              //CREATING A CHECKBOX
              //CREATIN A EDITTEXT
              return true;
          }
          return false;
      }
  });
  </code></pre>
  <h3>output,</h3>
  <p><a href="https://i.stack.imgur.com/z0W0m.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/z0W0m.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.stack.imgur.com/XFhZa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XFhZa.png" alt="enter image description here" /></a></p>