This commit is contained in:
serso 2016-01-30 14:00:28 +01:00
parent 37c40001d7
commit 4a9e8bf78a
4 changed files with 8 additions and 4 deletions

View File

@ -172,6 +172,7 @@ public class FloatingCalculatorKeyboard extends BaseFloatingKeyboard {
@Override
public void onClick(@NonNull View v) {
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
switch (v.getId()) {
case R.id.cpp_kb_button_divide:
user.insertOperator('/');
@ -215,7 +216,6 @@ public class FloatingCalculatorKeyboard extends BaseFloatingKeyboard {
break;
}
user.getEditor().requestFocus();
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
}
private void onDefaultClick(@NonNull View v) {

View File

@ -52,7 +52,9 @@ public class FunctionsActivity extends BaseActivity {
if (savedInstanceState == null) {
final Bundle extras = getIntent().getExtras();
final CppFunction function = extras != null ? (CppFunction) extras.getParcelable(EXTRA_FUNCTION) : null;
EditFunctionFragment.showDialog(function, this);
if (function != null) {
EditFunctionFragment.showDialog(function, this);
}
}
}

View File

@ -118,6 +118,7 @@ public class GreekFloatingKeyboard extends BaseFloatingKeyboard implements View.
@Override
public void onClick(View v) {
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
switch (v.getId()) {
case R.id.cpp_kb_button_close:
user.done();
@ -137,7 +138,6 @@ public class GreekFloatingKeyboard extends BaseFloatingKeyboard implements View.
break;
}
user.getEditor().requestFocus();
v.performHapticFeedback(HapticFeedbackConstants.KEYBOARD_TAP);
}
private void changeCase(@NonNull Button button) {

View File

@ -49,7 +49,9 @@ public class VariablesActivity extends BaseActivity implements CalculatorEventLi
if (savedInstanceState == null) {
final Bundle extras = getIntent().getExtras();
final CppVariable variable = extras != null ? (CppVariable) extras.getParcelable(EXTRA_VARIABLE) : null;
EditVariableFragment.showDialog(variable, this);
if (variable != null) {
EditVariableFragment.showDialog(variable, this);
}
}
}