@Test public void clearAnswer_updatesButtonLabel() { BearingWidget widget = createWidget(promptWithAnswer(new StringData("blah"))); widget.clearAnswer(); assertThat(widget.binding.bearingButton.getText(), is(widgetActivity.getString(R.string.get_bearing))); }
@Override public void clearAnswer() { binding.answerText.setText(null); binding.bearingButton.setText(getContext().getString(R.string.get_bearing)); widgetValueChanged(); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void clearAnswer() { binding.answerText.setText(null); binding.bearingButton.setText(getContext().getString(R.string.get_bearing)); widgetValueChanged(); } }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void clearAnswer() { binding.answerText.setText(null); binding.bearingButton.setText(getContext().getString(R.string.get_bearing)); widgetValueChanged(); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void clearAnswer() { binding.answerText.setText(null); binding.bearingButton.setText(getContext().getString(R.string.get_bearing)); widgetValueChanged(); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setBinaryData(Object answer); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress(); }
BearingWidget extends QuestionWidget implements BinaryDataReceiver { @Override public void clearAnswer() { binding.answerText.setText(null); binding.bearingButton.setText(getContext().getString(R.string.get_bearing)); widgetValueChanged(); } BearingWidget(Context context, QuestionDetails questionDetails, WaitingForDataRegistry waitingForDataRegistry, SensorManager sensorManager); @Override void clearAnswer(); @Override IAnswerData getAnswer(); @Override void setBinaryData(Object answer); @Override void setOnLongClickListener(OnLongClickListener l); @Override void cancelLongPress();  }