forked from upstream-mirrors/OpenTracks
Showing a message when no search results are found.
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright 2012 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apl/res/com.google.android.apps.mytracks"
|
||||
android:orientation="vertical"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent">
|
||||
<ListView android:id="@android:id/list"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent" />
|
||||
<TextView android:id="@android:id/empty"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
android:text="@string/search_no_results"
|
||||
android:textColor="@android:color/white"
|
||||
android:textSize="20dip"
|
||||
android:textStyle="bold"
|
||||
android:gravity="center"
|
||||
android:visibility="gone" />
|
||||
</LinearLayout>
|
||||
@@ -1115,6 +1115,11 @@ limitations under the License.
|
||||
keeping this consistent with other Android apps.">
|
||||
Search My Tracks
|
||||
</string>
|
||||
<string name="search_no_results"
|
||||
translation_description="Message shown instead of a list of results to indicate there were no
|
||||
search results.">
|
||||
No tracks or waypoints matched your search.
|
||||
</string>
|
||||
<string name="search_voice_prompt"
|
||||
translation_description="Prompt shown when the user activates voice search, asking him to speak
|
||||
what will be searched for.">
|
||||
|
||||
@@ -83,6 +83,8 @@ public class SearchActivity extends ListActivity {
|
||||
locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
|
||||
preferences = getSharedPreferences(Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
|
||||
|
||||
setContentView(R.layout.search_list);
|
||||
|
||||
handleIntent(getIntent());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user