From: thadh Date: Sun, 25 Oct 2009 21:56:20 +0000 (-0700) Subject: go X-Git-Url: http://gitweb.fperrin.net/?p=Dictionary.git;a=commitdiff_plain;h=f42ffbb78f720a0088e83859bdcce20ed43f0a89 go --- diff --git a/.classpath b/.classpath index 8a2ab5a..aa18ab6 100755 --- a/.classpath +++ b/.classpath @@ -4,6 +4,6 @@ - + diff --git a/jars/buildICU4J.sh b/jars/buildICU4J.sh new file mode 100755 index 0000000..a294d86 --- /dev/null +++ b/jars/buildICU4J.sh @@ -0,0 +1,27 @@ +#!/bin/bash -e + +DIR=`dirname $0`/icu4j-4_2_1-src + +cd $DIR +ant clean +ant collator +ant collIndices + +rm classes/com/ibm/icu/impl/data/icudt42b/ubidi.icu +rm classes/com/ibm/icu/impl/data/icudt42b/cnvalias.icu +rm -rf classes/com/ibm/icu/impl/data/icudt42b/brkitr + +rm -rf ./safe +mkdir ./safe +# Need this res_index.txt file because the process to auto-generate it from the context of the jar doesn't work on Android. +mv classes/com/ibm/icu/impl/data/icudt42b/coll/res_index.txt ./safe +mv classes/com/ibm/icu/impl/data/icudt42b/coll/en* ./safe +mv classes/com/ibm/icu/impl/data/icudt42b/coll/de* ./safe +mv classes/com/ibm/icu/impl/data/icudt42b/coll/ucadata.icu ./safe +rm classes/com/ibm/icu/impl/data/icudt42b/coll/* +mv ./safe/* classes/com/ibm/icu/impl/data/icudt42b/coll/ +rm -rf ./safe + +ant moduleJar + +ls -l $DIR/icu4j.jar diff --git a/jars/icu4j-4_2_1-src/build.xml b/jars/icu4j-4_2_1-src/build.xml index 82b5bc5..b1bef22 100755 --- a/jars/icu4j-4_2_1-src/build.xml +++ b/jars/icu4j-4_2_1-src/build.xml @@ -376,6 +376,12 @@ + + + + + + - + + + + + + + +
diff --git a/jars/icu4j-4_2_1-src/eclipseProjectMisc/initSrc.launch b/jars/icu4j-4_2_1-src/eclipseProjectMisc/initSrc.launch deleted file mode 100755 index 9a1b84e..0000000 --- a/jars/icu4j-4_2_1-src/eclipseProjectMisc/initSrc.launch +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/jars/icu4j-4_2_1-src/eclipseProjectMisc/normSrc.launch b/jars/icu4j-4_2_1-src/eclipseProjectMisc/normSrc.launch deleted file mode 100755 index 179d952..0000000 --- a/jars/icu4j-4_2_1-src/eclipseProjectMisc/normSrc.launch +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index 155a15c..0bfd39a 100755 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -205,7 +205,10 @@ public class DictionaryActivity extends ListActivity { private void closeCurrentDictionary() { Log.i(LOG, "closeCurrentDictionary"); - searchOperation.stopAndWait(); + if (searchOperation != null) { + searchOperation.stopAndWait(); + searchOperation = null; + } languageList = null; setListAdapter(null); dictionary = null; @@ -313,6 +316,7 @@ public class DictionaryActivity extends ListActivity { languageList = new LanguageListAdapter( dictionary.languageDatas[(languageList.languageData == dictionary.languageDatas[0]) ? 1 : 0]); + Log.d(LOG, "onLanguageButton, newLang=" + languageList.languageData.language.symbol); setListAdapter(languageList); updateLangButton(); onSearchTextChange(searchText.getText().toString()); @@ -327,8 +331,10 @@ public class DictionaryActivity extends ListActivity { if (selectedRowIndex == selectedTokenRowIndex && selectedRowIndex > 0) { destRowIndex = languageList.languageData.sortedIndex .get(prevTokenIndex).startRow; + Log.d(LOG, "onUpButton, jumping back a word, destRowIndex=" + destRowIndex); } else { destRowIndex = selectedTokenRowIndex; + Log.d(LOG, "onUpButton, jumping to top of word, destRowIndex=" + destRowIndex); } jumpToRow(languageList, destRowIndex); } @@ -342,8 +348,10 @@ public class DictionaryActivity extends ListActivity { if (nextTokenIndex < languageList.languageData.sortedIndex.size()) { destRowIndex = languageList.languageData.sortedIndex .get(nextTokenIndex).startRow; + Log.d(LOG, "onDownButton, jumping down a word, destRowIndex=" + destRowIndex); } else { destRowIndex = languageList.languageData.rows.size() - 1; + Log.d(LOG, "onDownButton, jumping to end of dict, destRowIndex=" + destRowIndex); } jumpToRow(languageList, destRowIndex); } diff --git a/src/com/hughes/android/dictionary/DictionaryActivityTest.java b/src/com/hughes/android/dictionary/DictionaryActivityTest.java index 5631b9d..5afcb22 100755 --- a/src/com/hughes/android/dictionary/DictionaryActivityTest.java +++ b/src/com/hughes/android/dictionary/DictionaryActivityTest.java @@ -34,7 +34,7 @@ public class DictionaryActivityTest extends ActivityInstrumentationTestCase2