diff --git a/res/values/strings.xml b/res/values/strings.xml index c3009029b..b965cb61d 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1,5 +1,8 @@ + Found %1$d applications matching \'%2$s\': + Found one application matching \'%s\': + No applications were found matching \'%s\' The new version is signed with a different key to the old one. To install the new version, the old one must be uninstalled first. Please do this and try again. (Note that uninstalling will erase any internal data stored by the application) Version %d versions available diff --git a/src/org/fdroid/fdroid/SearchResults.java b/src/org/fdroid/fdroid/SearchResults.java index ac3fa6a59..a3b95339d 100644 --- a/src/org/fdroid/fdroid/SearchResults.java +++ b/src/org/fdroid/fdroid/SearchResults.java @@ -27,6 +27,7 @@ import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.ListView; +import android.widget.TextView; public class SearchResults extends ListActivity { @@ -45,6 +46,15 @@ public class SearchResults extends ListActivity { String query = intent.getStringExtra(SearchManager.QUERY); DB db = new DB(this); Vector apps = db.getApps(null, query, false); + TextView tv = (TextView) findViewById(R.id.description); + String headertext; + if(apps.size()==0) + headertext = String.format(getString(R.string.searchres_noapps),query); + else if(apps.size()==1) + headertext = String.format(getString(R.string.searchres_oneapp),query); + else + headertext = String.format(getString(R.string.searchres_napps),apps.size(),query); + tv.setText(headertext); Log.d("FDroid", "Search for '" + query + "' returned " + apps.size() + " results"); for (DB.App app : apps) {