- Toast.makeText(context, getString(R.string.unzippingDictionary, dest),
- Toast.LENGTH_LONG).show();
+ if (!isFinishing())
+ Toast.makeText(context, getString(R.string.unzippingDictionary, dest),
+ Toast.LENGTH_LONG).show();
if (unzipInstall(context, Uri.parse(dest), dest, true)) {
finishedDownloadIds.add(downloadId);
if (unzipInstall(context, Uri.parse(dest), dest, true)) {
finishedDownloadIds.add(downloadId);
zipOut = new FileOutputStream(targetFile);
copyStream(zipFile, zipOut);
application.backgroundUpdateDictionaries(dictionaryUpdater);
zipOut = new FileOutputStream(targetFile);
copyStream(zipFile, zipOut);
application.backgroundUpdateDictionaries(dictionaryUpdater);
- Toast.makeText(context, getString(R.string.installationFinished, dest),
- Toast.LENGTH_LONG).show();
+ if (!isFinishing())
+ Toast.makeText(context, getString(R.string.installationFinished, dest),
+ Toast.LENGTH_LONG).show();
result = true;
} catch (Exception e) {
String msg = getString(R.string.unzippingFailed, dest + ": " + e.getMessage());
File dir = application.getDictDir();
result = true;
} catch (Exception e) {
String msg = getString(R.string.unzippingFailed, dest + ": " + e.getMessage());
File dir = application.getDictDir();
msg = getString(R.string.notWritable, dir.getAbsolutePath());
}
new AlertDialog.Builder(context).setTitle(getString(R.string.error)).setMessage(msg).setNeutralButton("Close", null).show();
msg = getString(R.string.notWritable, dir.getAbsolutePath());
}
new AlertDialog.Builder(context).setTitle(getString(R.string.error)).setMessage(msg).setNeutralButton("Close", null).show();
getListView().getContext()).inflate(
R.layout.dictionary_manager_header_row_downloadable, getListView(), false);
getListView().getContext()).inflate(
R.layout.dictionary_manager_header_row_downloadable, getListView(), false);
.findViewById(R.id.hideDownloadable);
showDownloadable.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
.findViewById(R.id.hideDownloadable);
showDownloadable.setOnCheckedChangeListener(new OnCheckedChangeListener() {
@Override
row = LayoutInflater.from(parent.getContext()).inflate(
R.layout.dictionary_manager_row, parent, false);
}
row = LayoutInflater.from(parent.getContext()).inflate(
R.layout.dictionary_manager_row, parent, false);
}
- final TextView name = (TextView) row.findViewById(R.id.dictionaryName);
- final TextView details = (TextView) row.findViewById(R.id.dictionaryDetails);
+ final TextView name = row.findViewById(R.id.dictionaryName);
+ final TextView details = row.findViewById(R.id.dictionaryDetails);
name.setText(application.getDictionaryName(dictionaryInfo.uncompressedFilename));
final boolean updateAvailable = application.updateAvailable(dictionaryInfo);
name.setText(application.getDictionaryName(dictionaryInfo.uncompressedFilename));
final boolean updateAvailable = application.updateAvailable(dictionaryInfo);
final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
boolean broken = false;
if (!dictionaryInfo.isValid()) {
final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
boolean broken = false;
if (!dictionaryInfo.isValid()) {