focus when returning to app, messed around with link colors.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.hughes.android.dictionary"
android:installLocation="auto"
- android:versionCode="22"
- android:versionName="4.0" >
+ android:versionCode="23"
+ android:versionName="4.0.1" >
<uses-sdk
android:minSdkVersion="4"
</head>
<body>
<!-- Don't use links in the text below, it crashes the app. -->
-Vielen Dank für die Aktualisierung auf QuickDic 4.0.
+Vielen Dank für die Aktualisierung auf QuickDic 4.0.1.
<p>Neue Funktionen:</p>
<ul>
-<li>Wenn QuickDic stürzt (vor allem Sony
-Ericsson-Geräte), versuchen Sie es mit QuickDic-Einstellungen,
-um zum "System default" Schriftart zu ändern.</li>
-<li>(Beta) Einsprachige Wörterbücher für Deutsch,
+<li>(Beta) Einsprachige Wörterbücher für Deutsch,
Englisch, Italienisch.</li>
-<li>Detailseiten zeigt Wiktionary Informationen für einige
-Wörter, einschließlich: Etymologie, Aussprache und
-Synonyme / Antonyme. (Und italienischen Konjugationen in der EN-IT
+<li>Detailseiten zeigt Wiktionary Informationen für einige
+Wörter, einschließlich: Etymologie, Aussprache und
+Synonyme / Antonyme. (Und italienischen Konjugationen in der EN-IT
Wörterbuch!)</li>
-<li>Mit Wiktionary Daten aus de.wiktionary.org, fr.wiktionary.org
+<li>Mit Wiktionary Daten aus de.wiktionary.org, fr.wiktionary.org
und it.wiktionary.org.</li>
-<li>Wörterbücher mit den neuesten Wiktionary Daten
+<li>Wörterbücher mit den neuesten Wiktionary Daten
aktualisiert.</li>
<li>Einfache Text-To-Speech für Haupt Zeilen.</li>
<li>Mehrere neue Wörterbücher, auf Anfrage.</li>
+<li>Wenn QuickDic stürzt (vor allem Sony
+Ericsson-Geräte), versuchen Sie es mit QuickDic-Einstellungen,
+um zum "System default" Schriftart zu ändern.</li>
</ul>
</body>
</html>
Thanks for updating to QuickDic 4.0.
<p>Nuove caratteristiche:</p>
<ul>
-<li>Se QuickDic si bloccasse (in particolare con cellulari Sony
-Ericsson), prova a cambiare le preferenze e impostare "default di
-sistema" font.</li>
<li>(Beta) Dizionari monolingue in inglese, tedesco, italiano.</li>
-<li>Aggiunte informazioni Wikizionario per alcune parole, tra cui:
-etimologia, pronuncia, sinonimi e contrari (inclusa coniugazione
+<li>Aggiunte informazioni Wikizionario per alcune parole, tra cui:
+etimologia, pronuncia, sinonimi e contrari (inclusa coniugazione
dei verbi italiani nel dizionario EN-IT!)</li>
-<li>Utilizza i dati di Wikizionario de.wiktionary.org,
+<li>Utilizza i dati di Wikizionario de.wiktionary.org,
fr.wiktionary.org e it.wiktionary.org.</li>
<li>Dizionario aggiornato con gli ultimi dati Wikizionario.</li>
-<li>Pronuncia per le parole principali utilizzando
+<li>Pronuncia per le parole principali utilizzando
text-to-speech.</li>
<li>Numerosi dizionari nuovi, su richiesta.</li>
+<li>Se QuickDic si bloccasse (in particolare con cellulari Sony
+Ericsson), prova a cambiare le preferenze e impostare "default di
+sistema" font.</li>
</ul>
</body>
</html>
</head>
<body>
<!-- Don't use links in the text below, it crashes the app. -->
-Thanks for updating to QuickDic 4.0.
+Thanks for updating to QuickDic 4.0.1.
<p>New features:</p>
<ul>
-<li>If QuickDic crashes (especially Sony Ericsson devices), try
-using QuickDic's preferences to change to the "System default"
-font.</li>
-<li>(Beta) Monolingual dictionaries for English, German,
+<li>Fixed crashes.</li>
+<li>Add option to hide previous and next word buttons.</li>
+<li>(Beta) Monolingual dictionaries for English, German,
Italian.</li>
-<li>Detail pages showing Wiktionary information for some words,
-including: etymology, pronunciation, and synonyms/antonyms. (And
+<li>Detail pages showing Wiktionary information for some words,
+including: etymology, pronunciation, and synonyms/antonyms. (And
Italian verb conjugations in the EN-IT dictionary!)</li>
-<li>Basic parsing of Wiktionary data from de.wiktionary.org,
-fr.wiktionary.org, and it.wiktionary.org for better coverage of
+<li>Basic parsing of Wiktionary data from de.wiktionary.org,
+fr.wiktionary.org, and it.wiktionary.org for better coverage of
those languages.</li>
<li>Dictionaries updated with latest Wiktionary data.</li>
<li>Simple text-to-speech pronunciations for main rows.</li>
<li>Several new dictionaries, by request.</li>
+<li>If QuickDic crashes (especially Sony Ericsson devices), try
+using QuickDic's preferences to change to the "System default"
+font.</li>
</ul>
</body>
</html>
<string name="app_name">QuickDic</string>
- <string name="titleWithVersion">QuickDic 4.0</string>
+ <string name="titleWithVersion">QuickDic 4.0.1</string>
<!-- Global. -->
<string name="about">Über QuickDic…</string>
<string name="managerFilterText">Filter</string>
<string name="managerFilterCheckbox">Nur SD-Karte</string>
- <string name="thanksForUpdatingVersion">4.0_de_b</string>
+ <string name="thanksForUpdatingVersion">4.0.1_de_b</string>
<!-- DictionaryActivity -->
<string name="searchText">Suchtext</string>
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">QuickDic</string>
-<string name="titleWithVersion">QuickDic 4.0</string>
+<string name="titleWithVersion">QuickDic 4.0.1</string>
<!-- Global. -->
<string name="about">About QuickDic…</string>
<string name="preferences">Preferenze…</string>
<string name="indexInfo">%1$s: %2$,d parole</string>
<string name="managerFilterText">Filtra lista</string>
<string name="managerFilterCheckbox">Solo locali</string>
-<string name="thanksForUpdatingVersion">4.0_it_a</string>
+<string name="thanksForUpdatingVersion">4.0.1_it_a</string>
<!-- DictionaryActivity -->
<string name="searchText">Cerca testo</string>
<string name="selectDictionary">Seleziona dizionario…</string>
<!-- Default: dark theme -->
<style name="Theme.Default" parent="@android:style/Theme.Holo">
- <item name="android:textColorLink">#0000FF</item>
</style>
<!-- ****************************************************************** -->
<style name="Theme.Light" parent="@android:style/Theme.Holo.Light">
- <item name="android:textColorLink">#0000FF</item>
</style>
<string name="app_name">QuickDic</string>
- <string name="titleWithVersion">QuickDic 4.0</string>
+ <string name="titleWithVersion">QuickDic 4.0.1</string>
<!-- Global. -->
<string name="about">About QuickDic…</string>
<string name="managerFilterCheckbox">Local only</string>
- <string name="thanksForUpdatingVersion">4.0_en_b</string>
+ <string name="thanksForUpdatingVersion">4.0.1_en_a</string>
<!-- DictionaryActivity -->
<string name="searchText">Search Text</string>
<string name="showClearSearchTextButtonTitle">Show \'clear search text\' button</string>
<string name="showClearSearchTextButtonSummary">Show the button to clear the search text. You can also just move focus away from search text and start typing.</string>
+ <string name="showPrevNextButtonsKey">showPrevNextButtons</string>
+ <string name="showPrevNextButtonsTitle">Show up/down buttons</string>
+ <string name="showPrevNextButtonsSummary">Show or hide the previous and next word buttons in the dictionary view.</string>
+
<string name="themeKey">theme</string>
<string name="themeTitle">UI theme</string>
<string name="themeSummary">User-interface color theme.</string>
<!-- Default: dark theme -->
<style name="Theme.Default" parent="@android:style/Theme">
- <item name="android:textColorLink">#FFFFFF</item>
</style>
<style name="Theme.Default.TokenRow.Fg" parent="@style/Theme.Default">
- <item name="android:textColor">#FFFFFF</item>
- </style>
+ <item name="android:textColor">#FFFFFF</item>
+ <item name="android:textColorLink">#00AAFF</item>
+ </style>
<color name="theme_default_token_row_fg">#FFFFFF</color>
<color name="theme_default_token_row_main_bg">#111111</color>
<!-- ****************************************************************** -->
<style name="Theme.Light" parent="@android:style/Theme.Light">
- <item name="android:textColorLink">#000000</item>
</style>
<style name="Theme.Light.TokenRow.Fg" parent="@style/Theme.Light">
- <item name="android:textColor">#000000</item>
+ <item name="android:textColor">#000000</item>
+ <item name="android:textColorLink">#0000FF</item>
</style>
<color name="theme_light_token_row_fg">#000000</color>
<color name="theme_light_token_row_other_bg">#EEEEEE</color>
<color name="theme_light_other_lang_bg">#FFFFFF</color>
-
</resources>
\ No newline at end of file
android:persistent="true"\r
/>\r
\r
+ <CheckBoxPreference \r
+ android:key="@string/showPrevNextButtonsKey"\r
+ android:title="@string/showPrevNextButtonsTitle"\r
+ android:summary="@string/showPrevNextButtonsSummary"\r
+ android:defaultValue="true"\r
+ android:persistent="true"\r
+ />\r
+ \r
<ListPreference \r
android:key="@string/themeKey"\r
android:title="@string/themeTitle"\r
volatile boolean ttsReady;
int textColorFg = Color.BLACK;
+
private final Executor searchExecutor = Executors.newSingleThreadExecutor(new ThreadFactory() {
@Override
onUpDownButton(false);
}
});
+ upButton.setVisibility(PreferenceManager.getDefaultSharedPreferences(this)
+ .getBoolean(getString(R.string.showPrevNextButtonsKey), true) ? View.VISIBLE
+ : View.GONE);
+ downButton.setVisibility(PreferenceManager.getDefaultSharedPreferences(this)
+ .getBoolean(getString(R.string.showPrevNextButtonsKey), true) ? View.VISIBLE
+ : View.GONE);
// getListView().setOnItemSelectedListener(new ListView.OnItemSelectedListener() {
// @Override
@Override
public void run() {
Log.d(LOG, "Trying to show soft keyboard.");
+ final boolean searchTextHadFocus = searchText.hasFocus();
+ searchText.requestFocus();
final InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
manager.showSoftInput(searchText, InputMethodManager.SHOW_IMPLICIT);
+ if (!searchTextHadFocus) {
+ defocusSearchText();
+ }
}}, 100);
}
}
private void updateTTSLanuage() {
- if (!ttsReady) {
+ if (!ttsReady || index == null || textToSpeech == null) {
+ Log.d(LOG, "Can't updateTTSLanguage.");
return;
}
final Locale locale = new Locale(index.sortLanguage.getIsoCode());
Log.d(LOG, "Setting TTS locale to: " + locale);
final int ttsResult = textToSpeech.setLanguage(locale);
- if (ttsResult != TextToSpeech.LANG_AVAILABLE || ttsResult != TextToSpeech.LANG_COUNTRY_AVAILABLE) {
+ if (ttsResult != TextToSpeech.LANG_AVAILABLE ||
+ ttsResult != TextToSpeech.LANG_COUNTRY_AVAILABLE) {
Log.e(LOG, "TTS not available in this language: ttsResult=" + ttsResult);
}
}
@Override
public void onClick(View v) {
String html = HtmlEntry.htmlBody(htmlEntries, index.shortName);
- Log.d(LOG, "html=" + html);
+ //Log.d(LOG, "html=" + html);
startActivityForResult(
HtmlDisplayActivity.getHtmlIntent(String.format(
"<html><head></head><body>%s</body></html>", html),
return new File(getDictDir(), uncompressedFilename);
}
-
-
+
String defaultLangISO2 = Locale.getDefault().getLanguage().toLowerCase();
String defaultLangName = null;
final Map<String, String> fileToNameCache = new LinkedHashMap<String, String>();
final int exactMatchIndex = findInsertionPointIndex(searchText, interrupted);
if (exactMatchIndex != -1) {
final IndexEntry exactMatch = sortedIndexEntries.get(exactMatchIndex);
- if (pattern.matcher(exactMatch.token).matches()) {
+ if (pattern.matcher(exactMatch.token).find()) {
matches.get(RowMatchType.TITLE_MATCH).add(rows.get(exactMatch.startRow));
}
}
isoCodeToResources.put("SA", new LanguageResources("Sanskrit", R.string.SA));\r
isoCodeToResources.put("SR", new LanguageResources("Serbian", R.string.SR));\r
isoCodeToResources.put("SK", new LanguageResources("Slovak", R.string.SK));\r
- isoCodeToResources.put("SK", new LanguageResources("Slovenian", R.string.SL));\r
+ isoCodeToResources.put("SL", new LanguageResources("Slovenian", R.string.SL));\r
isoCodeToResources.put("SO", new LanguageResources("Somali", R.string.SO));\r
isoCodeToResources.put("ES", new LanguageResources("Spanish", R.string.ES));\r
isoCodeToResources.put("SW", new LanguageResources("Swahili", R.string.SW));\r