fix crash in NumberPicker

This commit is contained in:
Milos Kozak 2019-07-29 23:24:55 +02:00
parent c0ec445fbe
commit 6daba3b9e7

View file

@ -163,12 +163,14 @@ public class NumberPicker extends LinearLayout implements View.OnKeyListener,
value = maxValue; value = maxValue;
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.youareonallowedlimit)); ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.youareonallowedlimit));
updateEditText(); updateEditText();
if (okButton != null)
okButton.setVisibility(VISIBLE); okButton.setVisibility(VISIBLE);
} }
if (value < minValue) { if (value < minValue) {
value = minValue; value = minValue;
ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.youareonallowedlimit)); ToastUtils.showToastInUiThread(MainApp.instance().getApplicationContext(), MainApp.gs(R.string.youareonallowedlimit));
updateEditText(); updateEditText();
if (okButton != null)
okButton.setVisibility(VISIBLE); okButton.setVisibility(VISIBLE);
} }
} }