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.setTitle(R.string.add_waypoint_dialog_title);
final EditText editText = new EditText(mapActivity);
editText.setId(R.id.TextView);
builder.setView(editText);
builder.setNegativeButton(R.string.default_buttons_cancel, null);
builder.setPositiveButton(R.string.default_buttons_add, new DialogInterface.OnClickListener() {
@ -716,12 +717,16 @@ public class MapActivityActions implements DialogProvider {
public void onPrepareDialog(int id, Dialog dialog) {
Bundle args = dialogBundle;
switch (id) {
case DIALOG_ADD_FAVORITE:
prepareAddFavouriteDialog(dialog,args);
break;
case DIALOG_ABOUT_ROUTE:
prepareAboutRouteDialog(dialog, args);
break;
case DIALOG_ADD_FAVORITE:
prepareAddFavouriteDialog(dialog, args);
break;
case DIALOG_ADD_WAYPOINT:
EditText v = (EditText) dialog.getWindow().findViewById(R.id.TextView);
v.setText("");
break;
case DIALOG_ABOUT_ROUTE:
prepareAboutRouteDialog(dialog, args);
break;
}
}