diff --git a/res/menu/local_help.xml b/res/menu/local_help.xml index b3fd9ecad..66b171b9b 100644 --- a/res/menu/local_help.xml +++ b/res/menu/local_help.xml @@ -7,6 +7,11 @@ app:actionViewClass="androidx.appcompat.widget.SearchView" app:showAsAction="collapseActionView|never" /> + + 0) { + updateResultCounter(activeMatchOrdinal, numberOfMatches); + } else { + if (lastQuery.isEmpty()) { + updateResultCounter(-1, 0); // hide + } else { + String msg = getString(R.string.search_no_result_for_x, lastQuery); + if (lastToast != null) { + lastToast.cancel(); + } + lastToast = Toast.makeText(this, msg, Toast.LENGTH_SHORT); + lastToast.show(); + updateResultCounter(0, 0); // show as "0/0" + } } - lastToast = Toast.makeText(this, msg, Toast.LENGTH_SHORT); - lastToast.show(); } } + + // other actions + @Override public boolean onOptionsItemSelected(MenuItem item) { super.onOptionsItemSelected(item);