@Override public void getPlaceholderTextInput (TextInputListener listener, String title, String placeholder) { TextInputDialogBox dialog = new TextInputDialogBox(title, null, placeholder); final TextInputListener capturedListener = listener; dialog.setListener(new TextInputDialogListener() { @Override public void onPositive (String text) { if (capturedListener != null) { capturedListener.input(text); } } @Override public void onNegative () { if (capturedListener != null) { capturedListener.canceled(); } } }); }
@Override public void getPlaceholderTextInput(TextInputListener listener, String title, String placeholder) { TextInputDialogBox dialog = new TextInputDialogBox(title, null, placeholder); final TextInputListener capturedListener = listener; dialog.setListener(new TextInputDialogListener() { @Override public void onPositive(String text) { if (capturedListener != null) { capturedListener.input(text); } } @Override public void onNegative() { if (capturedListener != null) { capturedListener.canceled(); } } }); }