The multiline text input for Android has only the carriage return button on the keyboard in place of the Done button. Is there any way to have a multiline text input with a done button also?
            Asked
            
        
        
            Active
            
        
            Viewed 1,942 times
        
    2 Answers
0
            No it's not possible. With multiline input on Android, the enter key is the only way to put a line break.
 
    
    
        Community
        
- 1
- 1
 
    
    
        Bhullnatik
        
- 1,263
- 17
- 28
0
            
            
        add this in your activity.java file within oncreate method after initialize
public class MainActivity extends AppCompatActivity{
    @Override
    public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        EditText option1_edt = (EditText)findViewById(R.id.editText);
       edt1.setImeOptions(EditorInfo.IME_ACTION_DONE);
       edt1.setRawInputType(InputType.TYPE_CLASS_TEXT);
}
Add this line in the .XML file
android:inputType="textMultiLine"
 
    
    
        Prince Dholakiya
        
- 3,255
- 27
- 43
