Display the error message on screen

Julien LepillerSun Jul 18 18:48:06+0200 2021

1620b0c

Display the error message on screen

app/src/main/java/eu/lepiller/nani/MainActivity.java

202202
            if (e instanceof NoDictionaryException) {
203203
                Snackbar.make(findViewById(R.id.search_form), getString(R.string.no_dic),
204204
                        Snackbar.LENGTH_LONG).show();
205+
                feedback_text.setText(getString(R.string.no_dic));
205206
            } else if(e instanceof IncompatibleFormatException) {
206207
                Snackbar.make(findViewById(R.id.search_form), String.format(getString(R.string.incompatible_format),
207208
                        ((IncompatibleFormatException) e).getName()), Snackbar.LENGTH_LONG).show();
209+
                feedback_text.setText(String.format(getString(R.string.incompatible_format),
210+
                        ((IncompatibleFormatException) e).getName()));
208211
            } else if(e instanceof NoResultDictionaryException) {
209212
                StringBuilder sb = new StringBuilder();
210213
                boolean first = true;

218221
                }
219222
                feedback_text.setText(String.format(getString(R.string.feedback_no_result_tried), sb.toString()));
220223
            }
221-
222-
            feedback_text.setText(R.string.feedback_no_result);
223224
            return;
224225
        }
225226