diff --git a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java index 60273b622..2317d42ad 100644 --- a/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java +++ b/android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java @@ -28,7 +28,6 @@ import android.net.Uri; import android.os.AsyncTask; import android.os.Build; import android.os.Bundle; -import android.os.Handler; import android.preference.PreferenceManager; import android.provider.Settings; import android.text.Editable; @@ -47,6 +46,7 @@ import android.view.ViewGroup; import android.view.animation.Animation; import android.view.animation.AnimationUtils; import android.view.animation.OvershootInterpolator; +import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; @@ -593,6 +593,10 @@ public class LibreOfficeUIActivity extends AppCompatActivity implements Settings // file name input final EditText input = (EditText)view.findViewById(R.id.fileName); input.setText(defaultFileName); + input.setSelection(0, input.getText().toString().lastIndexOf('.')); + input.requestFocus(); + InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); + imm.toggleSoftInput(InputMethodManager.SHOW_FORCED,0); // warning text to notify the user that such a file already exists final TextView warningText = (TextView)view.findViewById(R.id.overwriteWarning);