}
private View createDictionaryRow(final DictionaryInfo dictionaryInfo,
- final ViewGroup parent, final boolean canLaunch) {
+ final ViewGroup parent, boolean canLaunch) {
View row = LayoutInflater.from(parent.getContext()).inflate(
R.layout.dictionary_manager_row, parent, false);
final boolean updateAvailable = application.updateAvailable(dictionaryInfo);
final Button downloadButton = (Button) row.findViewById(R.id.downloadButton);
final DictionaryInfo downloadable = application.getDownloadable(dictionaryInfo.uncompressedFilename);
- if (!canLaunch || updateAvailable) {
+ boolean broken = false;
+ if (!dictionaryInfo.isValid()) {
+ broken = true;
+ canLaunch = false;
+ }
+ if (downloadable != null && (!canLaunch || updateAvailable)) {
downloadButton
.setText(getString(
R.string.downloadButton,
builder.append("; ");
builder.append(getString(R.string.downloadButton, downloadable.uncompressedBytes / 1024.0 / 1024.0));
}
+ if (broken) {
+ name.setText("Broken: " + application.getDictionaryName(dictionaryInfo.uncompressedFilename));
+ builder.append("; Cannot be used, redownload, check hardware/file system");
+ }
details.setText(builder.toString());
if (canLaunch) {