<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.hughes.android.dictionary" android:versionName="1.6" android:versionCode="6">
+ package="com.hughes.android.dictionary" android:versionName="1.8" android:versionCode="8">
- <uses-sdk android:minSdkVersion="2" />
+ <uses-sdk android:minSdkVersion="4" />
<uses-permission android:name="android.permission.INTERNET"/>
+ <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
+ <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application android:icon="@drawable/icon" android:label="@string/app_name">
- <activity android:name=".DictionaryActivity" android:label="@string/app_name">
+ <activity android:name=".DictionaryActivity"
+ android:label="@string/app_name"
+ android:windowSoftInputMode="stateVisible|adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
+
</activity>
<activity android:name="AboutActivity"/>
android:targetPackage="com.hughes.android.dictionary"
android:label="DictionaryActivityTest" />
-
-</manifest>
\ No newline at end of file
+</manifest>
+
\ No newline at end of file
# "build.properties", and override values to adapt the script to your
# project structure.
+# Indicates whether an apk should be generated for each density.
+split.density=false
# Project target.
-target=android-3
-# apk configurations. This property allows creation of APK files with limited
-# resources. For example, if your application contains many locales and
-# you wish to release multiple smaller apks instead of a large one, you can
-# define configuration to create apks with limited language sets.
-# Format is a comma separated list of configuration names. For each
-# configuration, a property will declare the resource configurations to
-# include. Example:
-# apk-configurations=european,northamerica
-# apk-config-european=en,fr,it,de,es
-# apk-config-northamerica=en,es
+target=android-6
apk-configurations=
android:hint="@string/searchText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:inputType="text"
+ android:inputType="text|textNoSuggestions"
+ android:imeOptions="actionSearch|flagNoEnterAction|flagNoExtractUi"
android:layout_weight="1.0"/>
<Button
<string name="failedAddingToWordList">Fehler bei Wortliste hinzufugen: %s</string>
<!-- About. -->
- <string name="titleWithVersion">QuickDic 1.6</string>
<string name="thadHughes">Thad Hughes</string>
<string name="contactMe">Wenn QuickDic dir gefällt, würde ich gern von dir hören. Bitte schicke Bemerkungen, Aufforderungen, oder Programmfehler an:</string>
<string name="myEmail">thad.hughes+quickdic@gmail.com</string>
<string name="saveOnlyFirstSubentrySummary">For entries with multiple sub-entries, only write the first to the word list.</string>
<string name="showClearSearchTextButtonKey">showClearSearchTextButton</string>
- <string name="showClearSearchTextButtonTitle">Show 'clear search text' button</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="dictFileKey">dictFile</string>
<string name="failedAddingToWordList">Failure adding to word list: %s</string>
<!-- About. -->
- <string name="titleWithVersion">QuickDic 1.6</string>
+ <string name="titleWithVersion">QuickDic 1.8</string>
<string name="thadHughes">Thad Hughes</string>
- <string name="contactMe">If you're using QuickDic, I'd love to hear from you. Please send comments, suggestions, bug reports, or just a quick hello to:</string>
+ <string name="contactMe">If you\'re using QuickDic, I\'d love to hear from you. Please send comments, suggestions, bug reports, or just a quick hello to:</string>
<string name="myEmail">thad.hughes+quickdic@gmail.com</string>
<string name="currentDictInfo">Current dictionary info:</string>
<string name="noDictLoaded">No dictionary loaded.</string>
<string name="saveOnlyFirstSubentrySummary">For entries with multiple sub-entries, only write the first to the word list.</string>
<string name="showClearSearchTextButtonKey">showClearSearchTextButton</string>
- <string name="showClearSearchTextButtonTitle">Show 'clear search text' button</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="dictFileKey">dictFile</string>
import android.view.ContextMenu.ContextMenuInfo;
import android.view.MenuItem.OnMenuItemClickListener;
import android.view.View.OnClickListener;
+import android.view.inputmethod.InputMethodManager;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.Button;
public class DictionaryActivity extends ListActivity {
- // TODO:
+ // TO DO:
// * Download latest dicts.
// * http://ftp.tu-chemnitz.de/pub/Local/urz/ding/de-en-devel/
// * http://www1.dict.cc/translation_file_request.php?l=e
final Button clearSearchTextButton = (Button) findViewById(R.id.ClearSearchTextButton);
clearSearchTextButton.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
- clearSearchTextButton.requestFocus();
- searchText.setText("");
- searchText.requestFocus();
+ onClearSearchTextButton(clearSearchTextButton);
}
});
clearSearchTextButton.setVisibility(PreferenceManager.getDefaultSharedPreferences(this).getBoolean(
void onSearchTextChange(final String searchText) {
Log.d(LOG, "onSearchTextChange: " + searchText);
synchronized (this) {
- searchOperation = new SearchOperation(languageList, searchText, searchOperation);
+ searchOperation = new SearchOperation(languageList, searchText.trim(), searchOperation);
searchExecutor.execute(searchOperation);
}
}
-
+ private void onClearSearchTextButton(final Button clearSearchTextButton) {
+ clearSearchTextButton.requestFocus();
+ searchText.setText("");
+ searchText.requestFocus();
+ Log.d(LOG, "Trying to show soft keyboard.");
+ final InputMethodManager manager = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
+ manager.showSoftInput(searchText, InputMethodManager.SHOW_IMPLICIT);
+ }
// ----------------------------------------------------------------
// ContextMenu
final String symbol;\r
final Locale locale;\r
\r
- private Collator sortCollator;\r
+ Collator sortCollator;\r
final Comparator<String> sortComparator;\r
\r
private Collator findCollator;\r
if (!canReadDict) {\r
statusText.setText(getString(R.string.unableToReadDictionaryFile, dictFile));\r
} else {\r
- statusText.setText(getString(R.string.dictionaryFileExists));\r
+ statusText.setText(getString(R.string.dictionaryFileExists, dictFile));\r
}\r
\r
final Button launchButton = (Button) findViewById(R.id.launchDict);\r