[Libreoffice-commits] online.git: android/app
mert (via logerrit)
logerrit at kemper.freedesktop.org
Wed Dec 18 14:14:39 UTC 2019
android/app/src/main/java/org/libreoffice/androidapp/ui/LibreOfficeUIActivity.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 638b2c7eda0145df45a9398a4af30716eadcc1d0
Author: mert <mert.tumer at collabora.com>
AuthorDate: Tue Dec 17 11:38:28 2019 +0000
Commit: Michael Meeks <michael.meeks at collabora.com>
CommitDate: Wed Dec 18 15:14:20 2019 +0100
Preselect the new document textbox on creation
This way it is easier to delete the text
and enter a new one
Change-Id: I98c28ed8782f8546ceca464e0dae6b8a637db198
Reviewed-on: https://gerrit.libreoffice.org/85295
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
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);
More information about the Libreoffice-commits
mailing list