merge heads

This commit is contained in:
Jimmy Shih
2012-03-22 12:12:14 -07:00
parent 3044a1daea
commit 0bd4461c32
3 changed files with 21 additions and 12 deletions
-3
View File
@@ -15,12 +15,9 @@ See the License for the specific language governing permissions and
limitations under the License.
-->
<menu xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:icon="@android:drawable/ic_menu_search"
android:id="@+id/menu_search"
android:onClick="onSearch"
android:showAsAction="always"
android:title="@string/menu_search"/>
</menu>
@@ -324,6 +324,17 @@ public class TrackList extends ListActivity
getMenuInflater().inflate(R.menu.search_only, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_search:
onSearchRequested();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override
protected Dialog onCreateDialog(int id) {
@@ -389,11 +400,6 @@ public class TrackList extends ListActivity
}
}
/* Callback from menu/search_only.xml */
public void onSearch(@SuppressWarnings("unused") MenuItem i) {
onSearchRequested();
}
private void updateButtonsEnabled() {
View deleteAll = findViewById(R.id.tracklist_btn_delete_all);
View exportAll = findViewById(R.id.tracklist_btn_export_all);
@@ -224,10 +224,16 @@ public class WaypointsList extends ListActivity implements View.OnClickListener
getMenuInflater().inflate(R.menu.search_only, menu);
return true;
}
/* Callback from menu/search_only.xml */
public void onSearch(@SuppressWarnings("unused") MenuItem i) {
onSearchRequested();
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_search:
onSearchRequested();
return true;
default:
return super.onOptionsItemSelected(item);
}
}
@Override