From 4b0d443d108c17dd6385fb42d84466470e28bf0a Mon Sep 17 00:00:00 2001 From: TrianguloY Date: Tue, 9 Apr 2019 20:55:20 +0200 Subject: [PATCH] Extracted strings from the search feature. --- .../net/pierrox/lightning_launcher/util/Search.java | 9 +++------ app/llx/app/src/main/res/layout/dialog_search.xml | 6 +++--- app/llx/core/src/main/res/values/strings.xml | 10 ++++++++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Search.java b/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Search.java index 61549d6..85eea63 100644 --- a/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Search.java +++ b/app/llx/app/src/main/java/net/pierrox/lightning_launcher/util/Search.java @@ -110,7 +110,6 @@ public class Search { } } - /** * Private: creates the dialog */ @@ -118,18 +117,16 @@ public class Search { View views = mCntx.getLayoutInflater().inflate(R.layout.dialog_search, null); - mEdTxt = views.findViewById(R.id.srch_text); mChkBackwards = views.findViewById(R.id.srch_back); mChkCase = views.findViewById(R.id.srch_case); mChkRegexp = views.findViewById(R.id.srch_regexp); - //TODO: extract string resources (here and in R.layout.dialog_search ) mDialog = new AlertDialog.Builder(mCntx) - .setTitle("Search text") + .setTitle(R.string.srch_ttl) .setView(views) .setCancelable(true) - .setPositiveButton("search", new DialogInterface.OnClickListener() { + .setPositiveButton(android.R.string.search_go, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { // After this code a 'dialog.dismiss()' will be called, so the dialog won't be shown again if necessary. @@ -143,7 +140,7 @@ public class Search { }); } }) - .setNegativeButton("cancel", null) + .setNegativeButton(android.R.string.cancel, null) .create(); } } diff --git a/app/llx/app/src/main/res/layout/dialog_search.xml b/app/llx/app/src/main/res/layout/dialog_search.xml index d187f73..3be60d4 100644 --- a/app/llx/app/src/main/res/layout/dialog_search.xml +++ b/app/llx/app/src/main/res/layout/dialog_search.xml @@ -17,17 +17,17 @@ android:id="@+id/srch_back" android:layout_width="match_parent" android:layout_height="wrap_content" - android:text="Backwards" /> + android:text="@string/srch_back" /> + android:text="@string/srch_case" /> + android:text="@string/srch_regexp" /> \ No newline at end of file diff --git a/app/llx/core/src/main/res/values/strings.xml b/app/llx/core/src/main/res/values/strings.xml index 558694d..3a3af22 100644 --- a/app/llx/core/src/main/res/values/strings.xml +++ b/app/llx/core/src/main/res/values/strings.xml @@ -1444,9 +1444,15 @@ No script Select shortcut +Search text +Backwards +Regexp +Match case - - Lightning Launcher + + + +Lightning Launcher English