Fix bug with clearing waypoint

This commit is contained in:
Victor Shcherb 2011-11-21 22:16:37 +01:00
parent 94ddd7a68c
commit 7f3f05b48c

View file

@ -188,6 +188,7 @@ public class MapActivityActions implements DialogProvider {
Builder builder = new AlertDialog.Builder(mapActivity); Builder builder = new AlertDialog.Builder(mapActivity);
builder.setTitle(R.string.add_waypoint_dialog_title); builder.setTitle(R.string.add_waypoint_dialog_title);
final EditText editText = new EditText(mapActivity); final EditText editText = new EditText(mapActivity);
editText.setId(R.id.TextView);
builder.setView(editText); builder.setView(editText);
builder.setNegativeButton(R.string.default_buttons_cancel, null); builder.setNegativeButton(R.string.default_buttons_cancel, null);
builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() { builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() {
@ -719,6 +720,10 @@ public class MapActivityActions implements DialogProvider {
case DIALOG_ADD_FAVORITE: case DIALOG_ADD_FAVORITE:
prepareAddFavouriteDialog(dialog, args); prepareAddFavouriteDialog(dialog, args);
break; break;
case DIALOG_ADD_WAYPOINT:
EditText v = (EditText) dialog.getWindow().findViewById(R.id.TextView);
v.setText("");
break;
case DIALOG_ABOUT_ROUTE: case DIALOG_ABOUT_ROUTE:
prepareAboutRouteDialog(dialog, args); prepareAboutRouteDialog(dialog, args);
break; break;