Status: | Merged |
---|---|
Merged at revision: | 48 |
Proposed branch: | lp:narau |
Merge into: | lp:narau/fdroid |
Diff against target: |
4521 lines (+932/-662) 112 files modified
Assets/gen_png.py (+63/-8) Assets/holo_dark/ic_erase.svg (+50/-0) Assets/holo_dark/ic_media_next.svg (+21/-4) Assets/holo_dark/ic_media_play.svg (+23/-4) Assets/holo_dark/ic_media_previous.svg (+24/-5) Narau/AndroidManifest.xml (+2/-2) Narau/project.properties (+1/-1) Narau/res/layout-land/download.xml (+1/-1) Narau/res/layout-land/learn_writing.xml (+1/-1) Narau/res/layout-large-land/dictionary_offline.xml (+2/-0) Narau/res/layout-large-land/download.xml (+1/-1) Narau/res/layout-large-land/kanji_to_words.xml (+1/-1) Narau/res/layout-large-land/learn_writing.xml (+1/-1) Narau/res/layout-large-port/download.xml (+1/-1) Narau/res/layout-large-port/kanji_to_words.xml (+1/-1) Narau/res/layout-large-port/learn_writing.xml (+1/-1) Narau/res/layout/download.xml (+1/-1) Narau/res/layout/kanji_line_sub_category.xml (+0/-1) Narau/res/layout/kanji_to_words.xml (+1/-1) Narau/res/layout/learn_writing.xml (+1/-1) Narau/res/layout/main_menu_item.xml (+13/-4) Narau/res/layout/narau.xml (+7/-11) Narau/res/values-large/dimens.xml (+7/-0) Narau/res/values/dimens.xml (+5/-0) Narau/res/values/values.xml (+1/-1) Narau/src/org/vono/narau/Narau.java (+1/-1) Narau/src/org/vono/narau/QuitThread.java (+2/-2) Narau/src/org/vono/narau/common/Common.java (+8/-11) Narau/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java (+2/-1) Narau/src/org/vono/narau/common/dictionary/EntryListFragment.java (+1/-1) Narau/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java (+18/-14) Narau/src/org/vono/narau/common/kanji/KanjiView.java (+7/-7) Narau/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java (+1/-1) Narau/src/org/vono/narau/db/DictionaryDB.java (+5/-5) Narau/src/org/vono/narau/db/InfosDB.java (+5/-0) Narau/src/org/vono/narau/db/KanjiDB.java (+15/-15) Narau/src/org/vono/narau/dictionary/DictionaryBase.java (+2/-1) Narau/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java (+4/-4) Narau/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java (+5/-3) Narau/src/org/vono/narau/dictionary/HistoryFragment.java (+1/-1) Narau/src/org/vono/narau/download/DownloaderActivity.java (+3/-3) Narau/src/org/vono/narau/download/DownloaderGzipDB.java (+2/-2) Narau/src/org/vono/narau/exercise/DrillCharActivity.java (+20/-14) Narau/src/org/vono/narau/learn/reading/KanaChartActivity.java (+9/-11) Narau/src/org/vono/narau/learn/reading/KanjiToWordActivity.java (+2/-2) Narau/src/org/vono/narau/learn/writing/LearnWritingActivity.java (+7/-7) Narau/src/org/vono/narau/models/dictionary/Entry.java (+12/-9) Narau/src/org/vono/narau/models/history/OnlineResult.java (+2/-1) Narau/src/org/vono/narau/models/history/SearchResult.java (+5/-0) Narau/src/org/vono/narau/preferences/Preferences.java (+2/-0) Narau/src/org/vono/narau/utils/FontFitTextView.java (+11/-11) Narau/src/org/vono/narau/utils/JsonReader.java (+6/-6) Narau/src/org/vono/narau/utils/Language.java (+1/-1) Narau/src/org/vono/narau/utils/StringPool.java (+3/-3) NarauCupcake/.settings/org.eclipse.jdt.core.prefs (+7/-0) NarauCupcake/AndroidManifest.xml (+2/-2) NarauCupcake/res/layout-land/download.xml (+1/-1) NarauCupcake/res/layout-land/learn_writing.xml (+1/-1) NarauCupcake/res/layout/download.xml (+1/-1) NarauCupcake/res/layout/kanji_to_words.xml (+1/-1) NarauCupcake/res/layout/learn_writing.xml (+1/-1) NarauCupcake/res/values/values.xml (+1/-0) NarauCupcake/src/android/compat/view/MenuCompat.java (+1/-0) NarauCupcake/src/android/compat/view/MenuInflater.java (+1/-0) NarauCupcake/src/android/compat/view/menu/IconMenuItemView.java (+1/-0) NarauCupcake/src/android/compat/view/menu/IconMenuView.java (+1/-0) NarauCupcake/src/android/compat/view/menu/MenuBuilder.java (+2/-1) NarauCupcake/src/android/compat/view/menu/MenuItemImpl.java (+1/-1) NarauCupcake/src/android/compat/view/menu/SubMenuBuilder.java (+1/-0) NarauCupcake/src/android/support/v4/app/BackStackRecord.java (+2/-0) NarauCupcake/src/android/support/v4/app/DialogFragment.java (+1/-0) NarauCupcake/src/android/support/v4/app/Fragment.java (+260/-322) NarauCupcake/src/android/support/v4/app/FragmentActivity.java (+1/-0) NarauCupcake/src/android/support/v4/app/FragmentManager.java (+3/-0) NarauCupcake/src/android/support/v4/app/ListFragment.java (+1/-0) NarauCupcake/src/android/support/v4/app/LoaderManager.java (+1/-0) NarauCupcake/src/android/support/v4/app/NotificationCompat.java (+5/-0) NarauCupcake/src/android/support/v4/app/TaskStackBuilder.java (+1/-0) NarauCupcake/src/android/support/v4/content/Loader.java (+1/-0) NarauCupcake/src/android/support/v4/util/LogWriter.java (+1/-0) NarauCupcake/src/android/support/v4/util/SparseArrayCompat.java (+1/-0) NarauCupcake/src/org/vono/narau/Narau.java (+2/-3) NarauCupcake/src/org/vono/narau/QuitThread.java (+2/-2) NarauCupcake/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java (+2/-1) NarauCupcake/src/org/vono/narau/common/dictionary/EntryListFragment.java (+1/-1) NarauCupcake/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java (+15/-11) NarauCupcake/src/org/vono/narau/common/kanji/KanjiView.java (+7/-7) NarauCupcake/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java (+1/-1) NarauCupcake/src/org/vono/narau/db/DictionaryDB.java (+5/-5) NarauCupcake/src/org/vono/narau/db/InfosDB.java (+5/-0) NarauCupcake/src/org/vono/narau/db/KanjiDB.java (+15/-15) NarauCupcake/src/org/vono/narau/dictionary/DictionaryBase.java (+2/-0) NarauCupcake/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java (+6/-6) NarauCupcake/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java (+25/-8) NarauCupcake/src/org/vono/narau/dictionary/HistoryFragment.java (+1/-1) NarauCupcake/src/org/vono/narau/download/DownloaderActivity.java (+3/-3) NarauCupcake/src/org/vono/narau/download/DownloaderGzipDB.java (+2/-2) NarauCupcake/src/org/vono/narau/exercise/DrillCharActivity.java (+20/-14) NarauCupcake/src/org/vono/narau/learn/reading/KanaChartActivity.java (+9/-11) NarauCupcake/src/org/vono/narau/learn/reading/KanjiToWordActivity.java (+22/-7) NarauCupcake/src/org/vono/narau/learn/writing/LearnWritingActivity.java (+35/-10) NarauCupcake/src/org/vono/narau/models/dictionary/Entry.java (+12/-9) NarauCupcake/src/org/vono/narau/models/history/OnlineResult.java (+1/-0) NarauCupcake/src/org/vono/narau/models/history/SearchResult.java (+5/-0) NarauCupcake/src/org/vono/narau/models/kanji/KanjiData.java (+1/-1) NarauCupcake/src/org/vono/narau/preferences/Preferences.java (+2/-0) NarauCupcake/src/org/vono/narau/preferences/PreferencesActivity.java (+2/-3) NarauCupcake/src/org/vono/narau/utils/FontFitTextView.java (+11/-11) NarauCupcake/src/org/vono/narau/utils/JsonReader.java (+7/-6) NarauCupcake/src/org/vono/narau/utils/Language.java (+1/-1) NarauCupcake/src/org/vono/narau/utils/StringPool.java (+3/-3) NarauDBInfo/narau_db_infos.txt (+14/-0) |
To merge this branch: | bzr merge lp:narau |
Related bugs: | |
Related blueprints: |
Kanji to words
(Medium)
Kanji radicals filter
(Medium)
Rework the dictionary activity
(Medium)
Split databases
(Medium)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Yvon TANGUY | Approve | ||
Review via email:
|
Commit message
Description of the change
Version 0.8.1 to fix the build problem with SDK 17 (4.2 Jelly Bean) not supported yet.
To post a comment you must log in.
Revision history for this message

Yvon TANGUY (vono22) : | # |
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'Assets/gen_png.py' |
2 | --- Assets/gen_png.py 2012-12-11 22:34:12 +0000 |
3 | +++ Assets/gen_png.py 2012-12-18 18:47:22 +0000 |
4 | @@ -1,4 +1,22 @@ |
5 | #!/usr/bin/env python |
6 | +# Copyright (C) 2012 Yvon TANGUY |
7 | +# |
8 | +# This program is free software: you can redistribute it and/or modify |
9 | +# it under the terms of the GNU General Public License as published by |
10 | +# the Free Software Foundation, either version 3 of the License, or |
11 | +# (at your option) any later version. |
12 | +# |
13 | +# This program is distributed in the hope that it will be useful, |
14 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | +# GNU General Public License for more details. |
17 | +# |
18 | +# You should have received a copy of the GNU General Public License |
19 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
20 | +# --------------------------------------------------------------------------- |
21 | +# This script generate png images from the svg files. |
22 | +# It needs inkscape and trimage to run. |
23 | +# |
24 | |
25 | import os |
26 | import sys |
27 | @@ -6,14 +24,48 @@ |
28 | |
29 | DIRS=['drawable-ldpi', 'drawable-mdpi', 'drawable-hdpi', 'drawable-xhdpi'] |
30 | RES=[36, 48, 72, 96] |
31 | + |
32 | +def usage(): |
33 | + print('usage:') |
34 | + print(sys.argv[0] + ' [-s <dir_suffix>] [-r <res_values>] [file.svg...]') |
35 | + print('') |
36 | + print('file.svg : list of svg files. If there is no file, it takes every svg file') |
37 | + print(' in the current directory') |
38 | + print('-s <dir_suffix> : a suffix like v11 to create drawable-{lmhx}dpi-v11') |
39 | + print('-r <res_values> : exported png file size: 24,32,48,64') |
40 | + print(' default values are 36,48,72,96') |
41 | + sys.exit(0) |
42 | + |
43 | +args_n = 1 |
44 | +dir_suffix='' |
45 | + |
46 | +# search for --help first |
47 | +if " ".join(sys.argv).find('--help') > -1: |
48 | + usage() |
49 | + |
50 | +if len(sys.argv) >= (args_n + 2) and sys.argv[args_n] == '-s': |
51 | + dir_suffix = '-' + sys.argv[args_n+1] |
52 | + args_n += 2 |
53 | +if len(sys.argv) >= (args_n + 2) and sys.argv[args_n] == '-r': |
54 | + # transform the parameter into an int array |
55 | + try: |
56 | + png_res = map(int, sys.argv[args_n+1].split(',')) |
57 | + except ValueError as ve: |
58 | + print('Error: ' + str(ve)) |
59 | + usage() |
60 | + if len(png_res) != 4: |
61 | + print('Error: Not enough resolutions') |
62 | + usage() |
63 | + args_n += 2 |
64 | +else: |
65 | + png_res = RES |
66 | + |
67 | +start_files_args = args_n |
68 | + |
69 | for i in range(len(DIRS)): |
70 | - d_dir = DIRS[i] |
71 | - res = str(RES[i]) |
72 | + d_dir = DIRS[i] + dir_suffix |
73 | + res = str(png_res[i]) |
74 | |
75 | - start_files_args = 1 |
76 | - if len(sys.argv) >= 3 and sys.argv[1] == '-s': |
77 | - d_dir = d_dir + '-' + sys.argv[2] |
78 | - start_files_args = 3 |
79 | if len(sys.argv) > start_files_args: |
80 | files = sys.argv[start_files_args:] |
81 | else: |
82 | @@ -22,10 +74,13 @@ |
83 | print('Gen png for ' + d_dir + ' (' + res + 'x' + res + ')...') |
84 | subprocess.call(['/bin/mkdir', '-p', d_dir]) |
85 | for svg in files: |
86 | - if len(svg) > 4 and svg[-4:] == '.svg': |
87 | + if len(svg) > 4 and svg[-4:] == '.svg' and os.path.isfile(svg): |
88 | png=d_dir + '/' + svg[:-4] + '.png' |
89 | subprocess.call(['/usr/bin/inkscape', '-z', '-C', svg, '-e', png, '-w', res, '-h', res]) |
90 | trimage = subprocess.Popen(['/usr/bin/trimage', '-f', png]) |
91 | + else: |
92 | + print('ignoring ' + svg) |
93 | |
94 | -trimage.wait() |
95 | +if trimage: |
96 | + trimage.wait() |
97 | |
98 | |
99 | === added file 'Assets/holo_dark/ic_erase.svg' |
100 | --- Assets/holo_dark/ic_erase.svg 1970-01-01 00:00:00 +0000 |
101 | +++ Assets/holo_dark/ic_erase.svg 2012-12-18 18:47:22 +0000 |
102 | @@ -0,0 +1,50 @@ |
103 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
104 | +<!-- Created with Inkscape (http://www.inkscape.org/) --> |
105 | + |
106 | +<!-- |
107 | + Copyright (C) 2012 Yvon TANGUY |
108 | + |
109 | + This program is free software: you can redistribute it and/or modify |
110 | + it under the terms of the GNU General Public License as published by |
111 | + the Free Software Foundation, either version 3 of the License, or |
112 | + (at your option) any later version. |
113 | + |
114 | + This program is distributed in the hope that it will be useful, |
115 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
116 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
117 | + GNU General Public License for more details. |
118 | + |
119 | + You should have received a copy of the GNU General Public License |
120 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
121 | +--> |
122 | + |
123 | +<svg |
124 | + xmlns:dc="http://purl.org/dc/elements/1.1/" |
125 | + xmlns:cc="http://creativecommons.org/ns#" |
126 | + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
127 | + xmlns:svg="http://www.w3.org/2000/svg" |
128 | + xmlns="http://www.w3.org/2000/svg" |
129 | + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" |
130 | + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" |
131 | + width="32" |
132 | + height="32" |
133 | + id="svg2" |
134 | + version="1.1"> |
135 | + <g |
136 | + inkscape:label="Calque 1" |
137 | + inkscape:groupmode="layer" |
138 | + id="layer1" |
139 | + transform="translate(0,-1020.3622)"> |
140 | + <g |
141 | + id="g3766" |
142 | + transform="matrix(1.0041347,0,0,0.99980837,21.288481,-16.644624)" |
143 | + style="fill:#ffffff;fill-opacity:1;stroke:#808080;stroke-width:0.94550657;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.50196078;stroke-dasharray:none"> |
144 | + <path |
145 | + style="fill:#ffffff;fill-opacity:1;stroke:#808080;stroke-width:0.94550657;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.50196078;stroke-dasharray:none" |
146 | + d="m -10.92751,1061.7366 -2.830402,-2.8426 5.6608049,-5.6853 -5.6608049,-5.6853 2.830402,-2.8427 5.6608054,5.6853 5.66080514,-5.6853 2.83040256,2.8427 -5.6608051,5.6853 5.6608051,5.6853 -2.83040256,2.8426 -5.66080514,-5.6853 z" |
147 | + id="path3772" |
148 | + inkscape:connector-curvature="0" |
149 | + sodipodi:nodetypes="ccccccccccccc" /> |
150 | + </g> |
151 | + </g> |
152 | +</svg> |
153 | |
154 | === modified file 'Assets/holo_dark/ic_media_next.svg' |
155 | --- Assets/holo_dark/ic_media_next.svg 2012-12-12 23:41:33 +0000 |
156 | +++ Assets/holo_dark/ic_media_next.svg 2012-12-18 18:47:22 +0000 |
157 | @@ -1,6 +1,23 @@ |
158 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
159 | <!-- Created with Inkscape (http://www.inkscape.org/) --> |
160 | |
161 | +<!-- |
162 | + Copyright (C) 2012 Yvon TANGUY |
163 | + |
164 | + This program is free software: you can redistribute it and/or modify |
165 | + it under the terms of the GNU General Public License as published by |
166 | + the Free Software Foundation, either version 3 of the License, or |
167 | + (at your option) any later version. |
168 | + |
169 | + This program is distributed in the hope that it will be useful, |
170 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
171 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
172 | + GNU General Public License for more details. |
173 | + |
174 | + You should have received a copy of the GNU General Public License |
175 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
176 | +--> |
177 | + |
178 | <svg |
179 | xmlns:dc="http://purl.org/dc/elements/1.1/" |
180 | xmlns:cc="http://creativecommons.org/ns#" |
181 | @@ -21,11 +38,11 @@ |
182 | inkscape:groupmode="layer"> |
183 | <g |
184 | id="g766" |
185 | - transform="matrix(1.25,0,0,-1.25,45.459852,-5.0189698)" |
186 | - style="opacity:0.8;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"> |
187 | + transform="matrix(0.86001832,0,0,-0.96174358,36.26881,-0.17188755)" |
188 | + style="opacity:0.8;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1.20000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.50196078;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3755);enable-background:accumulate"> |
189 | <path |
190 | - d="m -16.920903,-7.215176 0,-8.7086 -16.246979,8.7086 c 0.06811,-9.609915 0,-9.589704 0,-19.2 l 16.246979,8.713087 0,-8.713087 2.953021,0 0,19.2 z" |
191 | - style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;color:#000000;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
192 | + d="m -17.754052,-7.215176 0,-7.520444 -15.41383,7.520444 c 0.06811,-9.609915 0,-9.589704 0,-19.2 l 15.41383,7.520444 0,-7.520444 3.78617,0 0,19.2 z" |
193 | + style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1.20000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.50196078;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
194 | id="path768" |
195 | inkscape:connector-curvature="0" |
196 | sodipodi:nodetypes="ccccccccc" /> |
197 | |
198 | === modified file 'Assets/holo_dark/ic_media_play.svg' |
199 | --- Assets/holo_dark/ic_media_play.svg 2012-12-12 23:41:33 +0000 |
200 | +++ Assets/holo_dark/ic_media_play.svg 2012-12-18 18:47:22 +0000 |
201 | @@ -1,6 +1,23 @@ |
202 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
203 | <!-- Created with Inkscape (http://www.inkscape.org/) --> |
204 | |
205 | +<!-- |
206 | + Copyright (C) 2012 Yvon TANGUY |
207 | + |
208 | + This program is free software: you can redistribute it and/or modify |
209 | + it under the terms of the GNU General Public License as published by |
210 | + the Free Software Foundation, either version 3 of the License, or |
211 | + (at your option) any later version. |
212 | + |
213 | + This program is distributed in the hope that it will be useful, |
214 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
215 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
216 | + GNU General Public License for more details. |
217 | + |
218 | + You should have received a copy of the GNU General Public License |
219 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
220 | +--> |
221 | + |
222 | <svg |
223 | xmlns:dc="http://purl.org/dc/elements/1.1/" |
224 | xmlns:cc="http://creativecommons.org/ns#" |
225 | @@ -12,18 +29,20 @@ |
226 | width="32px" |
227 | height="32px" |
228 | id="svg3606" |
229 | - version="1.1"> |
230 | + version="1.1" |
231 | + inkscape:version="0.48.3.1 r9886" |
232 | + sodipodi:docname="ic_media_play.svg"> |
233 | <g |
234 | id="layer1" |
235 | inkscape:label="Layer 1" |
236 | inkscape:groupmode="layer"> |
237 | <g |
238 | id="g766" |
239 | - transform="matrix(1.25,0,0,-1.25,45.459852,-5.0189698)" |
240 | - style="opacity:0.8;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"> |
241 | + transform="matrix(0.9375,0,0,-1.0416667,38.094889,-1.5158092)" |
242 | + style="opacity:0.80000000000000004;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1.51789325;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-opacity:0.50196081000000004;stroke-miterlimit:4;stroke-dasharray:none;stroke-linejoin:round;filter:url(#filter3777)"> |
243 | <path |
244 | d="m -33.167882,-7.215176 0,-19.2 19.2,9.6 z" |
245 | - style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
246 | + style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1.51789325;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;stroke-opacity:0.50196081000000004;stroke-miterlimit:4;stroke-dasharray:none;stroke-linejoin:round" |
247 | id="path768" |
248 | inkscape:connector-curvature="0" |
249 | sodipodi:nodetypes="cccc" /> |
250 | |
251 | === modified file 'Assets/holo_dark/ic_media_previous.svg' |
252 | --- Assets/holo_dark/ic_media_previous.svg 2012-12-12 23:41:33 +0000 |
253 | +++ Assets/holo_dark/ic_media_previous.svg 2012-12-18 18:47:22 +0000 |
254 | @@ -1,6 +1,23 @@ |
255 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
256 | <!-- Created with Inkscape (http://www.inkscape.org/) --> |
257 | |
258 | +<!-- |
259 | + Copyright (C) 2012 Yvon TANGUY |
260 | + |
261 | + This program is free software: you can redistribute it and/or modify |
262 | + it under the terms of the GNU General Public License as published by |
263 | + the Free Software Foundation, either version 3 of the License, or |
264 | + (at your option) any later version. |
265 | + |
266 | + This program is distributed in the hope that it will be useful, |
267 | + but WITHOUT ANY WARRANTY; without even the implied warranty of |
268 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
269 | + GNU General Public License for more details. |
270 | + |
271 | + You should have received a copy of the GNU General Public License |
272 | + along with this program. If not, see <http://www.gnu.org/licenses/>. |
273 | +--> |
274 | + |
275 | <svg |
276 | xmlns:dc="http://purl.org/dc/elements/1.1/" |
277 | xmlns:cc="http://creativecommons.org/ns#" |
278 | @@ -12,18 +29,20 @@ |
279 | width="32px" |
280 | height="32px" |
281 | id="svg3606" |
282 | - version="1.1"> |
283 | + version="1.1" |
284 | + inkscape:version="0.48.3.1 r9886" |
285 | + sodipodi:docname="ic_media_previous.svg"> |
286 | <g |
287 | id="layer1" |
288 | inkscape:label="Layer 1" |
289 | inkscape:groupmode="layer"> |
290 | <g |
291 | id="g766" |
292 | - transform="matrix(-1.25,0,0,-1.25,-13.459853,-5.0189698)" |
293 | - style="fill:#ffffff;fill-opacity:1;opacity:0.8"> |
294 | + transform="matrix(-0.86001832,0,0,-0.96174358,-4.2688106,-0.17188755)" |
295 | + style="opacity:0.8;color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1.20000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.50196078;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter3755);enable-background:accumulate"> |
296 | <path |
297 | - d="m -16.920903,-7.215176 0,-8.7086 -16.246979,8.7086 c 0.06811,-9.609915 0,-9.589704 0,-19.2 l 16.246979,8.713087 0,-8.713087 2.953021,0 0,19.2 z" |
298 | - style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" |
299 | + d="m -17.754052,-7.215176 0,-7.520444 -15.41383,7.520444 c 0.06811,-9.609915 0,-9.589704 0,-19.2 l 15.41383,7.520444 0,-7.520444 3.78617,0 0,19.2 z" |
300 | + style="color:#000000;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:#808080;stroke-width:1.20000005;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:0.50196078;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" |
301 | id="path768" |
302 | inkscape:connector-curvature="0" |
303 | sodipodi:nodetypes="ccccccccc" /> |
304 | |
305 | === modified file 'Narau/AndroidManifest.xml' |
306 | --- Narau/AndroidManifest.xml 2012-12-13 16:03:49 +0000 |
307 | +++ Narau/AndroidManifest.xml 2012-12-18 18:47:22 +0000 |
308 | @@ -17,8 +17,8 @@ |
309 | --> |
310 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
311 | package="org.vono.narau" |
312 | - android:versionCode="5" |
313 | - android:versionName="0.8" > |
314 | + android:versionCode="6" |
315 | + android:versionName="0.8.1" > |
316 | |
317 | <!-- Permissions needed to download the database --> |
318 | <uses-permission android:name="android.permission.INTERNET" /> |
319 | |
320 | === modified file 'Narau/project.properties' |
321 | --- Narau/project.properties 2012-12-01 22:50:01 +0000 |
322 | +++ Narau/project.properties 2012-12-18 18:47:22 +0000 |
323 | @@ -11,4 +11,4 @@ |
324 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt |
325 | |
326 | # Project target. |
327 | -target=android-17 |
328 | +target=android-16 |
329 | |
330 | === added file 'Narau/res/drawable-hdpi/ic_erase.png' |
331 | Binary files Narau/res/drawable-hdpi/ic_erase.png 1970-01-01 00:00:00 +0000 and Narau/res/drawable-hdpi/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
332 | === modified file 'Narau/res/drawable-hdpi/ic_media_next.png' |
333 | Binary files Narau/res/drawable-hdpi/ic_media_next.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-hdpi/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
334 | === modified file 'Narau/res/drawable-hdpi/ic_media_play.png' |
335 | Binary files Narau/res/drawable-hdpi/ic_media_play.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-hdpi/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
336 | === modified file 'Narau/res/drawable-hdpi/ic_media_previous.png' |
337 | Binary files Narau/res/drawable-hdpi/ic_media_previous.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-hdpi/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
338 | === modified file 'Narau/res/drawable-hdpi/ic_menu_dictionary_offline.png' |
339 | Binary files Narau/res/drawable-hdpi/ic_menu_dictionary_offline.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-hdpi/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
340 | === modified file 'Narau/res/drawable-hdpi/ic_menu_dictionary_online.png' |
341 | Binary files Narau/res/drawable-hdpi/ic_menu_dictionary_online.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-hdpi/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
342 | === modified file 'Narau/res/drawable-hdpi/ic_menu_drill_from_japanese.png' |
343 | Binary files Narau/res/drawable-hdpi/ic_menu_drill_from_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-hdpi/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
344 | === modified file 'Narau/res/drawable-hdpi/ic_menu_drill_to_japanese.png' |
345 | Binary files Narau/res/drawable-hdpi/ic_menu_drill_to_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-hdpi/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
346 | === modified file 'Narau/res/drawable-hdpi/ic_menu_reading.png' |
347 | Binary files Narau/res/drawable-hdpi/ic_menu_reading.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-hdpi/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
348 | === modified file 'Narau/res/drawable-hdpi/ic_menu_writing.png' |
349 | Binary files Narau/res/drawable-hdpi/ic_menu_writing.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-hdpi/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
350 | === added file 'Narau/res/drawable-ldpi/ic_erase.png' |
351 | Binary files Narau/res/drawable-ldpi/ic_erase.png 1970-01-01 00:00:00 +0000 and Narau/res/drawable-ldpi/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
352 | === modified file 'Narau/res/drawable-ldpi/ic_media_next.png' |
353 | Binary files Narau/res/drawable-ldpi/ic_media_next.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-ldpi/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
354 | === modified file 'Narau/res/drawable-ldpi/ic_media_play.png' |
355 | Binary files Narau/res/drawable-ldpi/ic_media_play.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-ldpi/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
356 | === modified file 'Narau/res/drawable-ldpi/ic_media_previous.png' |
357 | Binary files Narau/res/drawable-ldpi/ic_media_previous.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-ldpi/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
358 | === modified file 'Narau/res/drawable-ldpi/ic_menu_dictionary_offline.png' |
359 | Binary files Narau/res/drawable-ldpi/ic_menu_dictionary_offline.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-ldpi/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
360 | === modified file 'Narau/res/drawable-ldpi/ic_menu_dictionary_online.png' |
361 | Binary files Narau/res/drawable-ldpi/ic_menu_dictionary_online.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-ldpi/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
362 | === modified file 'Narau/res/drawable-ldpi/ic_menu_drill_from_japanese.png' |
363 | Binary files Narau/res/drawable-ldpi/ic_menu_drill_from_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-ldpi/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
364 | === modified file 'Narau/res/drawable-ldpi/ic_menu_drill_to_japanese.png' |
365 | Binary files Narau/res/drawable-ldpi/ic_menu_drill_to_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-ldpi/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
366 | === modified file 'Narau/res/drawable-ldpi/ic_menu_reading.png' |
367 | Binary files Narau/res/drawable-ldpi/ic_menu_reading.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-ldpi/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
368 | === modified file 'Narau/res/drawable-ldpi/ic_menu_writing.png' |
369 | Binary files Narau/res/drawable-ldpi/ic_menu_writing.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-ldpi/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
370 | === added file 'Narau/res/drawable-mdpi/ic_erase.png' |
371 | Binary files Narau/res/drawable-mdpi/ic_erase.png 1970-01-01 00:00:00 +0000 and Narau/res/drawable-mdpi/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
372 | === modified file 'Narau/res/drawable-mdpi/ic_media_next.png' |
373 | Binary files Narau/res/drawable-mdpi/ic_media_next.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-mdpi/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
374 | === modified file 'Narau/res/drawable-mdpi/ic_media_play.png' |
375 | Binary files Narau/res/drawable-mdpi/ic_media_play.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-mdpi/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
376 | === modified file 'Narau/res/drawable-mdpi/ic_media_previous.png' |
377 | Binary files Narau/res/drawable-mdpi/ic_media_previous.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-mdpi/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
378 | === modified file 'Narau/res/drawable-mdpi/ic_menu_dictionary_offline.png' |
379 | Binary files Narau/res/drawable-mdpi/ic_menu_dictionary_offline.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-mdpi/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
380 | === modified file 'Narau/res/drawable-mdpi/ic_menu_dictionary_online.png' |
381 | Binary files Narau/res/drawable-mdpi/ic_menu_dictionary_online.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-mdpi/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
382 | === modified file 'Narau/res/drawable-mdpi/ic_menu_drill_from_japanese.png' |
383 | Binary files Narau/res/drawable-mdpi/ic_menu_drill_from_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-mdpi/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
384 | === modified file 'Narau/res/drawable-mdpi/ic_menu_drill_to_japanese.png' |
385 | Binary files Narau/res/drawable-mdpi/ic_menu_drill_to_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-mdpi/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
386 | === modified file 'Narau/res/drawable-mdpi/ic_menu_reading.png' |
387 | Binary files Narau/res/drawable-mdpi/ic_menu_reading.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-mdpi/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
388 | === modified file 'Narau/res/drawable-mdpi/ic_menu_writing.png' |
389 | Binary files Narau/res/drawable-mdpi/ic_menu_writing.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-mdpi/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
390 | === added file 'Narau/res/drawable-xhdpi/ic_erase.png' |
391 | Binary files Narau/res/drawable-xhdpi/ic_erase.png 1970-01-01 00:00:00 +0000 and Narau/res/drawable-xhdpi/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
392 | === modified file 'Narau/res/drawable-xhdpi/ic_media_next.png' |
393 | Binary files Narau/res/drawable-xhdpi/ic_media_next.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-xhdpi/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
394 | === modified file 'Narau/res/drawable-xhdpi/ic_media_play.png' |
395 | Binary files Narau/res/drawable-xhdpi/ic_media_play.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-xhdpi/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
396 | === modified file 'Narau/res/drawable-xhdpi/ic_media_previous.png' |
397 | Binary files Narau/res/drawable-xhdpi/ic_media_previous.png 2012-12-12 23:41:33 +0000 and Narau/res/drawable-xhdpi/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
398 | === modified file 'Narau/res/drawable-xhdpi/ic_menu_dictionary_offline.png' |
399 | Binary files Narau/res/drawable-xhdpi/ic_menu_dictionary_offline.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-xhdpi/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
400 | === modified file 'Narau/res/drawable-xhdpi/ic_menu_dictionary_online.png' |
401 | Binary files Narau/res/drawable-xhdpi/ic_menu_dictionary_online.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-xhdpi/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
402 | === modified file 'Narau/res/drawable-xhdpi/ic_menu_drill_from_japanese.png' |
403 | Binary files Narau/res/drawable-xhdpi/ic_menu_drill_from_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-xhdpi/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
404 | === modified file 'Narau/res/drawable-xhdpi/ic_menu_drill_to_japanese.png' |
405 | Binary files Narau/res/drawable-xhdpi/ic_menu_drill_to_japanese.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-xhdpi/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
406 | === modified file 'Narau/res/drawable-xhdpi/ic_menu_reading.png' |
407 | Binary files Narau/res/drawable-xhdpi/ic_menu_reading.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-xhdpi/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
408 | === modified file 'Narau/res/drawable-xhdpi/ic_menu_writing.png' |
409 | Binary files Narau/res/drawable-xhdpi/ic_menu_writing.png 2012-12-11 22:34:12 +0000 and Narau/res/drawable-xhdpi/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
410 | === modified file 'Narau/res/layout-land/download.xml' |
411 | --- Narau/res/layout-land/download.xml 2012-12-12 23:41:33 +0000 |
412 | +++ Narau/res/layout-land/download.xml 2012-12-18 18:47:22 +0000 |
413 | @@ -84,7 +84,7 @@ |
414 | android:layout_height="wrap_content" |
415 | android:layout_gravity="center_horizontal" |
416 | android:layout_marginTop="15dp" |
417 | - android:drawableLeft="@android:drawable/ic_delete" |
418 | + android:drawableLeft="@drawable/ic_erase" |
419 | android:onClick="onClickButtonCancel" |
420 | android:text="@android:string/cancel" /> |
421 | |
422 | |
423 | === modified file 'Narau/res/layout-land/learn_writing.xml' |
424 | --- Narau/res/layout-land/learn_writing.xml 2012-12-13 00:54:38 +0000 |
425 | +++ Narau/res/layout-land/learn_writing.xml 2012-12-18 18:47:22 +0000 |
426 | @@ -59,7 +59,7 @@ |
427 | android:layout_height="wrap_content" |
428 | android:contentDescription="@string/clear" |
429 | android:onClick="clearUserDrawing" |
430 | - android:src="@android:drawable/ic_delete" /> |
431 | + android:src="@drawable/ic_erase" /> |
432 | |
433 | <ImageButton |
434 | android:id="@+id/learnWritingButtonNext" |
435 | |
436 | === modified file 'Narau/res/layout-large-land/dictionary_offline.xml' |
437 | --- Narau/res/layout-large-land/dictionary_offline.xml 2012-12-11 01:07:49 +0000 |
438 | +++ Narau/res/layout-large-land/dictionary_offline.xml 2012-12-18 18:47:22 +0000 |
439 | @@ -45,6 +45,8 @@ |
440 | android:name="org.vono.narau.common.dictionary.EntryListFragment" |
441 | android:layout_width="0dp" |
442 | android:layout_height="match_parent" |
443 | + android:layout_marginBottom="5dp" |
444 | + android:layout_marginTop="10dp" |
445 | android:layout_weight="0.5" /> |
446 | |
447 | </LinearLayout> |
448 | \ No newline at end of file |
449 | |
450 | === modified file 'Narau/res/layout-large-land/download.xml' |
451 | --- Narau/res/layout-large-land/download.xml 2012-12-12 23:41:33 +0000 |
452 | +++ Narau/res/layout-large-land/download.xml 2012-12-18 18:47:22 +0000 |
453 | @@ -92,7 +92,7 @@ |
454 | android:layout_height="wrap_content" |
455 | android:layout_marginLeft="100dp" |
456 | android:layout_marginRight="100dp" |
457 | - android:drawableLeft="@android:drawable/ic_delete" |
458 | + android:drawableLeft="@drawable/ic_erase" |
459 | android:onClick="onClickButtonCancel" |
460 | android:text="@android:string/cancel" /> |
461 | |
462 | |
463 | === modified file 'Narau/res/layout-large-land/kanji_to_words.xml' |
464 | --- Narau/res/layout-large-land/kanji_to_words.xml 2012-12-13 20:37:03 +0000 |
465 | +++ Narau/res/layout-large-land/kanji_to_words.xml 2012-12-18 18:47:22 +0000 |
466 | @@ -39,7 +39,7 @@ |
467 | android:layout_width="0dp" |
468 | android:layout_height="wrap_content" |
469 | android:layout_weight="1" |
470 | - android:gravity="center_horizontal" |
471 | + android:gravity="center" |
472 | android:textAppearance="?android:attr/textAppearanceLarge" > |
473 | </TextView> |
474 | |
475 | |
476 | === modified file 'Narau/res/layout-large-land/learn_writing.xml' |
477 | --- Narau/res/layout-large-land/learn_writing.xml 2012-12-13 00:54:38 +0000 |
478 | +++ Narau/res/layout-large-land/learn_writing.xml 2012-12-18 18:47:22 +0000 |
479 | @@ -60,7 +60,7 @@ |
480 | android:contentDescription="@string/clear" |
481 | android:onClick="clearUserDrawing" |
482 | android:scaleType="fitCenter" |
483 | - android:src="@android:drawable/ic_delete" /> |
484 | + android:src="@drawable/ic_erase" /> |
485 | |
486 | <ImageButton |
487 | android:id="@+id/learnWritingButtonNext" |
488 | |
489 | === modified file 'Narau/res/layout-large-port/download.xml' |
490 | --- Narau/res/layout-large-port/download.xml 2012-12-12 23:41:33 +0000 |
491 | +++ Narau/res/layout-large-port/download.xml 2012-12-18 18:47:22 +0000 |
492 | @@ -91,7 +91,7 @@ |
493 | android:layout_width="match_parent" |
494 | android:layout_height="wrap_content" |
495 | android:layout_gravity="center_horizontal" |
496 | - android:drawableLeft="@android:drawable/ic_delete" |
497 | + android:drawableLeft="@drawable/ic_erase" |
498 | android:onClick="onClickButtonCancel" |
499 | android:text="@android:string/cancel" /> |
500 | |
501 | |
502 | === modified file 'Narau/res/layout-large-port/kanji_to_words.xml' |
503 | --- Narau/res/layout-large-port/kanji_to_words.xml 2012-12-12 23:41:33 +0000 |
504 | +++ Narau/res/layout-large-port/kanji_to_words.xml 2012-12-18 18:47:22 +0000 |
505 | @@ -38,7 +38,7 @@ |
506 | android:layout_width="0dp" |
507 | android:layout_height="wrap_content" |
508 | android:layout_weight="1" |
509 | - android:gravity="center_horizontal" |
510 | + android:gravity="center" |
511 | android:textAppearance="?android:attr/textAppearanceLarge" > |
512 | </TextView> |
513 | |
514 | |
515 | === modified file 'Narau/res/layout-large-port/learn_writing.xml' |
516 | --- Narau/res/layout-large-port/learn_writing.xml 2012-12-13 00:54:38 +0000 |
517 | +++ Narau/res/layout-large-port/learn_writing.xml 2012-12-18 18:47:22 +0000 |
518 | @@ -71,7 +71,7 @@ |
519 | android:contentDescription="@string/clear" |
520 | android:onClick="clearUserDrawing" |
521 | android:scaleType="fitCenter" |
522 | - android:src="@android:drawable/ic_delete" /> |
523 | + android:src="@drawable/ic_erase" /> |
524 | |
525 | <ImageButton |
526 | android:id="@+id/learnWritingButtonNext" |
527 | |
528 | === modified file 'Narau/res/layout/download.xml' |
529 | --- Narau/res/layout/download.xml 2012-12-12 23:41:33 +0000 |
530 | +++ Narau/res/layout/download.xml 2012-12-18 18:47:22 +0000 |
531 | @@ -89,7 +89,7 @@ |
532 | android:layout_height="wrap_content" |
533 | android:layout_gravity="center_horizontal" |
534 | android:layout_marginTop="15dp" |
535 | - android:drawableLeft="@android:drawable/ic_delete" |
536 | + android:drawableLeft="@drawable/ic_erase" |
537 | android:onClick="onClickButtonCancel" |
538 | android:text="@android:string/cancel" /> |
539 | |
540 | |
541 | === modified file 'Narau/res/layout/kanji_line_sub_category.xml' |
542 | --- Narau/res/layout/kanji_line_sub_category.xml 2012-12-13 17:40:21 +0000 |
543 | +++ Narau/res/layout/kanji_line_sub_category.xml 2012-12-18 18:47:22 +0000 |
544 | @@ -35,7 +35,6 @@ |
545 | android:layout_width="wrap_content" |
546 | android:layout_height="match_parent" |
547 | android:layout_alignParentRight="true" |
548 | - android:layout_marginRight="5dp" |
549 | android:adjustViewBounds="true" |
550 | android:contentDescription="@string/next" |
551 | android:scaleType="centerInside" |
552 | |
553 | === modified file 'Narau/res/layout/kanji_to_words.xml' |
554 | --- Narau/res/layout/kanji_to_words.xml 2012-12-13 00:54:38 +0000 |
555 | +++ Narau/res/layout/kanji_to_words.xml 2012-12-18 18:47:22 +0000 |
556 | @@ -40,7 +40,7 @@ |
557 | android:layout_width="0dp" |
558 | android:layout_height="wrap_content" |
559 | android:layout_weight="1" |
560 | - android:gravity="center_horizontal" |
561 | + android:gravity="center" |
562 | android:lines="2" |
563 | android:textAppearance="?android:attr/textAppearanceLarge" > |
564 | </TextView> |
565 | |
566 | === modified file 'Narau/res/layout/learn_writing.xml' |
567 | --- Narau/res/layout/learn_writing.xml 2012-12-13 00:54:38 +0000 |
568 | +++ Narau/res/layout/learn_writing.xml 2012-12-18 18:47:22 +0000 |
569 | @@ -73,7 +73,7 @@ |
570 | android:contentDescription="@string/clear" |
571 | android:onClick="clearUserDrawing" |
572 | android:scaleType="fitCenter" |
573 | - android:src="@android:drawable/ic_delete" /> |
574 | + android:src="@drawable/ic_erase" /> |
575 | |
576 | <ImageButton |
577 | android:id="@+id/learnWritingButtonNext" |
578 | |
579 | === modified file 'Narau/res/layout/main_menu_item.xml' |
580 | --- Narau/res/layout/main_menu_item.xml 2012-12-11 22:34:12 +0000 |
581 | +++ Narau/res/layout/main_menu_item.xml 2012-12-18 18:47:22 +0000 |
582 | @@ -21,11 +21,17 @@ |
583 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
584 | android:layout_width="match_parent" |
585 | android:layout_height="wrap_content" |
586 | + android:layout_marginLeft="16dip" |
587 | + android:layout_marginRight="?android:attr/scrollbarSize" |
588 | android:baselineAligned="false" |
589 | android:gravity="center_vertical" |
590 | - android:minHeight="?android:attr/listPreferredItemHeight" |
591 | + android:minHeight="?android:attr/listPreferredItemHeight" > |
592 | + |
593 | + <!-- android-17: --> |
594 | + <!-- |
595 | android:paddingEnd="?android:attr/scrollbarSize" |
596 | - android:paddingStart="16dip" > |
597 | + android:paddingStart="16dip" |
598 | + --> |
599 | |
600 | <LinearLayout |
601 | android:layout_width="wrap_content" |
602 | @@ -41,11 +47,12 @@ |
603 | android:contentDescription="@android:string/untitled" /> |
604 | </LinearLayout> |
605 | |
606 | + <!-- android-17: android:layout_marginEnd="6dip" --> |
607 | + |
608 | <RelativeLayout |
609 | android:layout_width="0dp" |
610 | android:layout_height="wrap_content" |
611 | android:layout_marginBottom="6dip" |
612 | - android:layout_marginEnd="6dip" |
613 | android:layout_marginLeft="6dip" |
614 | android:layout_marginTop="6dip" |
615 | android:layout_weight="1" > |
616 | @@ -59,11 +66,13 @@ |
617 | android:singleLine="true" |
618 | android:textAppearance="?android:attr/textAppearanceMedium" /> |
619 | |
620 | + <!-- android-17: android:layout_alignStart="@android:id/title" --> |
621 | + |
622 | <TextView |
623 | android:id="@+android:id/summary" |
624 | android:layout_width="wrap_content" |
625 | android:layout_height="wrap_content" |
626 | - android:layout_alignStart="@android:id/title" |
627 | + android:layout_alignLeft="@android:id/title" |
628 | android:layout_below="@android:id/title" |
629 | android:maxLines="4" |
630 | android:textAppearance="?android:attr/textAppearanceSmall" |
631 | |
632 | === modified file 'Narau/res/layout/narau.xml' |
633 | --- Narau/res/layout/narau.xml 2012-11-26 18:30:29 +0000 |
634 | +++ Narau/res/layout/narau.xml 2012-12-18 18:47:22 +0000 |
635 | @@ -1,13 +1,9 @@ |
636 | <?xml version="1.0" encoding="utf-8"?> |
637 | -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
638 | +<fragment xmlns:android="http://schemas.android.com/apk/res/android" |
639 | + android:name="org.vono.narau.MainMenuFragment" |
640 | android:layout_width="match_parent" |
641 | - android:layout_height="match_parent" |
642 | - android:orientation="vertical" > |
643 | - |
644 | - <fragment |
645 | - android:name="org.vono.narau.MainMenuFragment" |
646 | - android:layout_width="match_parent" |
647 | - android:layout_height="wrap_content" |
648 | - android:tag="main_menu_items" /> |
649 | - |
650 | -</LinearLayout> |
651 | \ No newline at end of file |
652 | + android:layout_height="wrap_content" |
653 | + android:layout_gravity="center" |
654 | + android:layout_marginLeft="@dimen/narauMargingLeft" |
655 | + android:layout_marginRight="@dimen/narauMargingRight" |
656 | + android:tag="main_menu_items" /> |
657 | |
658 | === added directory 'Narau/res/values-large' |
659 | === added file 'Narau/res/values-large/dimens.xml' |
660 | --- Narau/res/values-large/dimens.xml 1970-01-01 00:00:00 +0000 |
661 | +++ Narau/res/values-large/dimens.xml 2012-12-18 18:47:22 +0000 |
662 | @@ -0,0 +1,7 @@ |
663 | +<?xml version="1.0" encoding="utf-8"?> |
664 | +<resources> |
665 | + |
666 | + <dimen name="narauMargingLeft">50dip</dimen> |
667 | + <dimen name="narauMargingRight">50dip</dimen> |
668 | + |
669 | +</resources> |
670 | \ No newline at end of file |
671 | |
672 | === added file 'Narau/res/values/dimens.xml' |
673 | --- Narau/res/values/dimens.xml 1970-01-01 00:00:00 +0000 |
674 | +++ Narau/res/values/dimens.xml 2012-12-18 18:47:22 +0000 |
675 | @@ -0,0 +1,5 @@ |
676 | +<?xml version="1.0" encoding="utf-8"?> |
677 | +<resources> |
678 | + <dimen name="narauMargingLeft">10dp</dimen> |
679 | + <dimen name="narauMargingRight">10dp</dimen> |
680 | +</resources> |
681 | \ No newline at end of file |
682 | |
683 | === modified file 'Narau/res/values/values.xml' |
684 | --- Narau/res/values/values.xml 2012-12-16 19:56:19 +0000 |
685 | +++ Narau/res/values/values.xml 2012-12-18 18:47:22 +0000 |
686 | @@ -1,7 +1,7 @@ |
687 | <?xml version="1.0" encoding="utf-8"?> |
688 | <resources xmlns:android="http://schemas.android.com/apk/res/android"> |
689 | |
690 | - <!-- http://serveur/narau/narau_db_infos.txt --> |
691 | + <!-- http://192.168.3.1/narau/narau_db_infos_ip.txt --> |
692 | <item name="db_infos_url" type="string">https://bazaar.launchpad.net/~vono22/narau/fdroid/view/head:/NarauDBInfo/narau_db_infos.txt</item> |
693 | <!-- Preferences names --> |
694 | <item name="prefNameVersion" type="string">version</item> |
695 | |
696 | === modified file 'Narau/src/org/vono/narau/Narau.java' |
697 | --- Narau/src/org/vono/narau/Narau.java 2012-12-13 20:37:03 +0000 |
698 | +++ Narau/src/org/vono/narau/Narau.java 2012-12-18 18:47:22 +0000 |
699 | @@ -328,7 +328,7 @@ |
700 | final TextView tvSummary = (TextView) cView.findViewById(android.R.id.summary); |
701 | final ImageView ivIcon = (ImageView) cView.findViewById(android.R.id.icon); |
702 | |
703 | - final MenuActivity item = listActivities.get(position); |
704 | + final MenuActivity item = this.listActivities.get(position); |
705 | tvTitle.setText(item.name); |
706 | ivIcon.setImageDrawable(item.icon); |
707 | tvSummary.setText(item.description); |
708 | |
709 | === modified file 'Narau/src/org/vono/narau/QuitThread.java' |
710 | --- Narau/src/org/vono/narau/QuitThread.java 2012-12-09 01:58:19 +0000 |
711 | +++ Narau/src/org/vono/narau/QuitThread.java 2012-12-18 18:47:22 +0000 |
712 | @@ -88,12 +88,12 @@ |
713 | |
714 | synchronized (this) { |
715 | try { |
716 | - this.wait(exitTime); |
717 | + this.wait(this.exitTime); |
718 | } catch (InterruptedException ie) { |
719 | } |
720 | |
721 | if (this.haveToExit) { |
722 | - Log.i(TAG, "Stop application after " + (exitTime / 1000) + "s of inactivity"); |
723 | + Log.i(TAG, "Stop application after " + (this.exitTime / 1000) + "s of inactivity"); |
724 | System.exit(0); |
725 | } |
726 | } |
727 | |
728 | === modified file 'Narau/src/org/vono/narau/common/Common.java' |
729 | --- Narau/src/org/vono/narau/common/Common.java 2012-12-09 01:58:19 +0000 |
730 | +++ Narau/src/org/vono/narau/common/Common.java 2012-12-18 18:47:22 +0000 |
731 | @@ -166,10 +166,8 @@ |
732 | } |
733 | |
734 | /** |
735 | - * Based on: <a |
736 | - * href="http://www.mauvecloud.net/charsets/kanagenerator.html"> |
737 | - * kanagenerator</a> and <a |
738 | - * href="http://www.mauvecloud.net/charsets/romaji.html">romaji</a> |
739 | + * Based on: <a href="http://www.mauvecloud.net/charsets/kanagenerator.html"> kanagenerator</a> |
740 | + * and <a href="http://www.mauvecloud.net/charsets/romaji.html">romaji</a> |
741 | * |
742 | * @param originalText |
743 | * The text to convert |
744 | @@ -262,8 +260,7 @@ |
745 | } |
746 | |
747 | /** |
748 | - * Return a localized string from the application's package's default string |
749 | - * table. |
750 | + * Return a localized string from the application's package's default string table. |
751 | * |
752 | * @param id |
753 | * The resource id for the string |
754 | @@ -276,9 +273,9 @@ |
755 | } |
756 | |
757 | /** |
758 | - * Return a localized formatted string from the application's package's |
759 | - * default string table, substituting the format arguments as defined in |
760 | - * java.util.Formatter and java.lang.String.format. |
761 | + * Return a localized formatted string from the application's package's default string table, |
762 | + * substituting the format arguments as defined in java.util.Formatter and |
763 | + * java.lang.String.format. |
764 | * |
765 | * @param id |
766 | * Resource id for the format string formatArgs The format |
767 | @@ -391,8 +388,8 @@ |
768 | } |
769 | |
770 | /** |
771 | - * My split string function (String.toSplit() don't work like I want) May |
772 | - * return an array of 0 length. |
773 | + * My split string function (String.toSplit() don't work like I want) May return an array of 0 |
774 | + * length. |
775 | * |
776 | * @param toSplit |
777 | * The String to split |
778 | |
779 | === modified file 'Narau/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java' |
780 | --- Narau/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java 2012-12-16 19:16:57 +0000 |
781 | +++ Narau/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java 2012-12-18 18:47:22 +0000 |
782 | @@ -95,7 +95,8 @@ |
783 | tvReading.setMovementMethod(LinkMovementMethod.getInstance()); |
784 | |
785 | tvSense.setText(Html.fromHtml(entry.getHTMLSenses())); |
786 | - LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1.0f); |
787 | + LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
788 | + ViewGroup.LayoutParams.WRAP_CONTENT, 1.0f); |
789 | tvSense.setLayoutParams(lp); |
790 | tvSense.setMovementMethod(LinkMovementMethod.getInstance()); |
791 | // Try to put the tvSense displayed |
792 | |
793 | === modified file 'Narau/src/org/vono/narau/common/dictionary/EntryListFragment.java' |
794 | --- Narau/src/org/vono/narau/common/dictionary/EntryListFragment.java 2012-12-11 01:07:49 +0000 |
795 | +++ Narau/src/org/vono/narau/common/dictionary/EntryListFragment.java 2012-12-18 18:47:22 +0000 |
796 | @@ -70,7 +70,7 @@ |
797 | View v = super.onCreateView(inflater, container, savedInstanceState); |
798 | |
799 | if (0 != this.headerLayoutId) { |
800 | - View header = super.getLayoutInflater(savedInstanceState).inflate(headerLayoutId, null); |
801 | + View header = super.getLayoutInflater(savedInstanceState).inflate(this.headerLayoutId, null); |
802 | |
803 | // http://stackoverflow.com/a/4401369 |
804 | LayoutParams lp = new ListView.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); |
805 | |
806 | === modified file 'Narau/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java' |
807 | --- Narau/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java 2012-12-09 01:58:19 +0000 |
808 | +++ Narau/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java 2012-12-18 18:47:22 +0000 |
809 | @@ -47,8 +47,8 @@ |
810 | import android.widget.TextView; |
811 | |
812 | /** |
813 | - * Display a list of kanjis pass as an extra with the TAG key, and return the |
814 | - * position of the character which had a long click on it. |
815 | + * Display a list of kanjis pass as an extra with the TAG key, and return the position of the |
816 | + * character which had a long click on it. |
817 | * |
818 | */ |
819 | public class KanjiListSelectActivity extends Activity implements OnTouchListener, OnLongClickListener { |
820 | @@ -69,9 +69,8 @@ |
821 | private ArrayList<Kanji> kanjiList; |
822 | private ArrayList<Radical> radicalsList; |
823 | /** |
824 | - * When kanjis are filtered, store the display position and the absolute |
825 | - * kanji position, to be able to return the good value to the parent |
826 | - * activity. |
827 | + * When kanjis are filtered, store the display position and the absolute kanji position, to be |
828 | + * able to return the good value to the parent activity. |
829 | */ |
830 | private SparseIntArray filterPositions; |
831 | private int numRadSelected; |
832 | @@ -270,7 +269,7 @@ |
833 | } |
834 | sbRad.append("</body></html>"); |
835 | this.textViewRadicals.setText(Html.fromHtml(sbRad.toString())); |
836 | - |
837 | + |
838 | } else { |
839 | // Build the list of selected radicals |
840 | final ArrayList<Radical> lRadicalsList = this.radicalsList; |
841 | @@ -375,6 +374,11 @@ |
842 | dest.writeByte((byte) (this.noMatch ? 1 : 0)); |
843 | } |
844 | |
845 | + @Override |
846 | + public int hashCode() { |
847 | + return this.codepoint; |
848 | + } |
849 | + |
850 | public static final Parcelable.Creator<Radical> CREATOR = new Parcelable.Creator<Radical>() { |
851 | public Radical createFromParcel(Parcel in) { |
852 | return new Radical(in); |
853 | @@ -446,16 +450,16 @@ |
854 | |
855 | @Override |
856 | public void handleMessage(Message msg) { |
857 | - if (LOAD_DONE == msg.what && null != activity) { |
858 | - if (null != activity.progressDialog) { |
859 | - activity.progressDialog.dismiss(); |
860 | - activity.progressDialog = null; |
861 | + if (LOAD_DONE == msg.what && null != this.activity) { |
862 | + if (null != this.activity.progressDialog) { |
863 | + this.activity.progressDialog.dismiss(); |
864 | + this.activity.progressDialog = null; |
865 | } |
866 | - activity.kanjiList = KanjiListSelectActivity.thread.tKanjiList; |
867 | - activity.radicalsList = KanjiListSelectActivity.thread.tRadicalsList; |
868 | + this.activity.kanjiList = KanjiListSelectActivity.thread.tKanjiList; |
869 | + this.activity.radicalsList = KanjiListSelectActivity.thread.tRadicalsList; |
870 | |
871 | - activity.initUI(); |
872 | - activity.updateKanjiList(); |
873 | + this.activity.initUI(); |
874 | + this.activity.updateKanjiList(); |
875 | |
876 | KanjiListSelectActivity.thread = null; |
877 | KanjiListSelectActivity.handler = null; |
878 | |
879 | === modified file 'Narau/src/org/vono/narau/common/kanji/KanjiView.java' |
880 | --- Narau/src/org/vono/narau/common/kanji/KanjiView.java 2012-12-09 01:58:19 +0000 |
881 | +++ Narau/src/org/vono/narau/common/kanji/KanjiView.java 2012-12-18 18:47:22 +0000 |
882 | @@ -219,9 +219,9 @@ |
883 | switch (event.getAction()) { |
884 | case MotionEvent.ACTION_DOWN: |
885 | if (this.svgDrawing.isPointInDrawing(x, y)) { |
886 | - drawable = this.svgDrawing; |
887 | + this.drawable = this.svgDrawing; |
888 | } else if (this.userDrawing.isPointInDrawing(x, y)) { |
889 | - drawable = this.userDrawing; |
890 | + this.drawable = this.userDrawing; |
891 | } |
892 | if (null != this.drawable) { |
893 | this.drawable.touchDown(x, y); |
894 | @@ -493,7 +493,7 @@ |
895 | this.touchX = x; |
896 | this.touchY = y; |
897 | this.path = new Path(); |
898 | - this.paths.add(path); |
899 | + this.paths.add(this.path); |
900 | this.path.moveTo(x, y); |
901 | super.strokesNumberPos.add(new PointF(x, y)); |
902 | } |
903 | @@ -745,7 +745,7 @@ |
904 | char c = svgPath.charAt(i); |
905 | boolean isLetter = Character.isLetter(c); |
906 | |
907 | - if (((intPartTen > 1 && c == '-') || c == ',' || (i > 0 && isLetter))) { |
908 | + if (((intPartTen > 1 && c == '-') || c == ',' || (i > 0 && isLetter)) && null != params) { |
909 | // end of the number, start of the new one |
910 | float f = intPart; |
911 | if (0 != floatPartTen) { |
912 | @@ -795,7 +795,7 @@ |
913 | } |
914 | } |
915 | |
916 | - if (i == lastPos) { |
917 | + if (i == lastPos && null != params) { |
918 | // The last number |
919 | float f = intPart; |
920 | if (0 != floatPartTen) { |
921 | @@ -828,7 +828,7 @@ |
922 | public String toString() { |
923 | StringBuilder sb = new StringBuilder(); |
924 | |
925 | - sb.append(cmd); |
926 | + sb.append(this.cmd); |
927 | int numF = this.params.size(); |
928 | |
929 | for (int i = 0; i < numF; i++) { |
930 | @@ -846,7 +846,7 @@ |
931 | |
932 | boolean valid() { |
933 | boolean ret = true; |
934 | - int numParams = params.size(); |
935 | + int numParams = this.params.size(); |
936 | |
937 | switch (this.cmd) { |
938 | case 'c': |
939 | |
940 | === modified file 'Narau/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java' |
941 | --- Narau/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java 2012-12-09 01:58:19 +0000 |
942 | +++ Narau/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java 2012-12-18 18:47:22 +0000 |
943 | @@ -112,7 +112,7 @@ |
944 | this.dismiss(); |
945 | Preferences.setFloat(this.idPrefName, this.fValue); |
946 | if (null != this.dismissListener) { |
947 | - dismissListener.onDialogDismiss(this); |
948 | + this.dismissListener.onDialogDismiss(this); |
949 | } |
950 | } |
951 | |
952 | |
953 | === modified file 'Narau/src/org/vono/narau/db/DictionaryDB.java' |
954 | --- Narau/src/org/vono/narau/db/DictionaryDB.java 2012-12-16 19:16:57 +0000 |
955 | +++ Narau/src/org/vono/narau/db/DictionaryDB.java 2012-12-18 18:47:22 +0000 |
956 | @@ -470,8 +470,8 @@ |
957 | public Entry next() { |
958 | Entry entry = null; |
959 | |
960 | - if (null != super.cursor && !super.cursor.isClosed() && cursor.moveToNext()) { |
961 | - int id = cursor.getInt(0); |
962 | + if (null != super.cursor && !super.cursor.isClosed() && super.cursor.moveToNext()) { |
963 | + int id = super.cursor.getInt(0); |
964 | entry = DictionaryDB.loadEntry(id); |
965 | } |
966 | return entry; |
967 | @@ -531,9 +531,9 @@ |
968 | public Entry next() { |
969 | if (null != this.cursor && this.cursor.moveToNext()) { |
970 | |
971 | - final int id = cursor.getInt(0); |
972 | - final String keb = cursor.getString(1); |
973 | - final String pri = cursor.getString(2); |
974 | + final int id = super.cursor.getInt(0); |
975 | + final String keb = super.cursor.getString(1); |
976 | + final String pri = super.cursor.getString(2); |
977 | |
978 | // The kanji element |
979 | Entry entry = new Entry(id); |
980 | |
981 | === modified file 'Narau/src/org/vono/narau/db/InfosDB.java' |
982 | --- Narau/src/org/vono/narau/db/InfosDB.java 2012-12-11 01:07:49 +0000 |
983 | +++ Narau/src/org/vono/narau/db/InfosDB.java 2012-12-18 18:47:22 +0000 |
984 | @@ -189,6 +189,11 @@ |
985 | return false; |
986 | } |
987 | |
988 | + @Override |
989 | + public int hashCode() { |
990 | + return this.dbName.hashCode(); |
991 | + } |
992 | + |
993 | /** |
994 | * Parse a single line in narau_db_infos.txt file<br/> |
995 | * |
996 | |
997 | === modified file 'Narau/src/org/vono/narau/db/KanjiDB.java' |
998 | --- Narau/src/org/vono/narau/db/KanjiDB.java 2012-12-11 01:07:49 +0000 |
999 | +++ Narau/src/org/vono/narau/db/KanjiDB.java 2012-12-18 18:47:22 +0000 |
1000 | @@ -604,7 +604,7 @@ |
1001 | public Kanji first() { |
1002 | Kanji kanji = null; |
1003 | if (this.cursor.moveToFirst()) { |
1004 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1005 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1006 | this.loadReading); |
1007 | this.current = 0; |
1008 | } |
1009 | @@ -618,7 +618,7 @@ |
1010 | public Kanji next() { |
1011 | Kanji kanji = null; |
1012 | if (!this.cursor.isClosed() && this.cursor.moveToNext()) { |
1013 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1014 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1015 | this.loadReading); |
1016 | this.current++; |
1017 | } |
1018 | @@ -632,7 +632,7 @@ |
1019 | public Kanji previous() { |
1020 | Kanji kanji = null; |
1021 | if (this.cursor.moveToPrevious()) { |
1022 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1023 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1024 | this.loadReading); |
1025 | this.current--; |
1026 | } |
1027 | @@ -646,7 +646,7 @@ |
1028 | public Kanji last() { |
1029 | Kanji kanji = null; |
1030 | if (this.cursor.moveToLast()) { |
1031 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1032 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1033 | this.loadReading); |
1034 | this.current = this.count; |
1035 | } |
1036 | @@ -666,7 +666,7 @@ |
1037 | if (!this.cursor.isClosed() && newPosition >= 0 && newPosition < this.count) { |
1038 | if (this.cursor.moveToPosition(newPosition)) { |
1039 | this.current = newPosition; |
1040 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1041 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1042 | this.loadReading); |
1043 | } |
1044 | } |
1045 | @@ -683,7 +683,7 @@ |
1046 | public Kanji get(int index) { |
1047 | Kanji kanji = null; |
1048 | if (this.cursor.moveToPosition(index)) { |
1049 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1050 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
1051 | this.loadReading); |
1052 | this.cursor.moveToPosition(this.current); |
1053 | } |
1054 | @@ -763,8 +763,8 @@ |
1055 | public Integer next() { |
1056 | this.codepoint = -1; |
1057 | if (!this.cursor.isAfterLast() && !this.cursor.isClosed()) { |
1058 | - if (cursor.moveToNext()) { |
1059 | - this.codepoint = cursor.getInt(0); |
1060 | + if (this.cursor.moveToNext()) { |
1061 | + this.codepoint = this.cursor.getInt(0); |
1062 | this.current++; |
1063 | } |
1064 | } |
1065 | @@ -779,8 +779,8 @@ |
1066 | public Integer previous() { |
1067 | this.codepoint = -1; |
1068 | if (!this.cursor.isBeforeFirst() && !this.cursor.isClosed()) { |
1069 | - if (cursor.moveToPrevious()) { |
1070 | - this.codepoint = cursor.getInt(0); |
1071 | + if (this.cursor.moveToPrevious()) { |
1072 | + this.codepoint = this.cursor.getInt(0); |
1073 | this.current--; |
1074 | } |
1075 | } |
1076 | @@ -795,8 +795,8 @@ |
1077 | public Integer first() { |
1078 | this.codepoint = -1; |
1079 | if (!this.cursor.isClosed()) { |
1080 | - if (cursor.moveToFirst()) { |
1081 | - this.codepoint = cursor.getInt(0); |
1082 | + if (this.cursor.moveToFirst()) { |
1083 | + this.codepoint = this.cursor.getInt(0); |
1084 | this.current = 0; |
1085 | } |
1086 | } |
1087 | @@ -811,8 +811,8 @@ |
1088 | public Integer last() { |
1089 | this.codepoint = -1; |
1090 | if (!this.cursor.isClosed()) { |
1091 | - if (cursor.moveToLast()) { |
1092 | - this.codepoint = cursor.getInt(0); |
1093 | + if (this.cursor.moveToLast()) { |
1094 | + this.codepoint = this.cursor.getInt(0); |
1095 | this.current = this.count; |
1096 | } |
1097 | } |
1098 | @@ -832,7 +832,7 @@ |
1099 | if (!this.cursor.isClosed() && newPosition >= 0 && newPosition < this.count) { |
1100 | if (this.cursor.moveToPosition(newPosition)) { |
1101 | this.current = newPosition; |
1102 | - this.codepoint = cursor.getInt(0); |
1103 | + this.codepoint = this.cursor.getInt(0); |
1104 | } |
1105 | } |
1106 | return this.codepoint; |
1107 | |
1108 | === modified file 'Narau/src/org/vono/narau/dictionary/DictionaryBase.java' |
1109 | --- Narau/src/org/vono/narau/dictionary/DictionaryBase.java 2012-12-16 19:16:57 +0000 |
1110 | +++ Narau/src/org/vono/narau/dictionary/DictionaryBase.java 2012-12-18 18:47:22 +0000 |
1111 | @@ -56,7 +56,7 @@ |
1112 | private static final char A_ROMANJI = 'a'; |
1113 | private static final char A_HIRAGANA = 'あ'; |
1114 | private static final char A_KATAKANA = 'ア'; |
1115 | - |
1116 | + |
1117 | protected static final String LANG_PAIR_SEP = ","; |
1118 | |
1119 | private static final int ACTIVITY_HISTORY_RESULT_CODE = 1209; |
1120 | @@ -276,6 +276,7 @@ |
1121 | |
1122 | this.editTextInput.setText(Common.EMPTY_STRING); |
1123 | this.buttonConvRomanji.setText(Character.valueOf(A_HIRAGANA).toString()); |
1124 | + this.editTextInput.requestFocus(); |
1125 | this.setWidgetEnabled(true); |
1126 | |
1127 | // show the keyboard |
1128 | |
1129 | === modified file 'Narau/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java' |
1130 | --- Narau/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java 2012-12-13 16:03:49 +0000 |
1131 | +++ Narau/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java 2012-12-18 18:47:22 +0000 |
1132 | @@ -96,9 +96,10 @@ |
1133 | |
1134 | final ArrayList<Language> languagesDictionary = Preferences.getLangsPriorities(DatabaseType.dictonary); |
1135 | final int numLangs = languagesDictionary.size(); |
1136 | - final ArrayList<Language> languagesDisplay = new ArrayList<Language>(numLangs + 1); |
1137 | + final ArrayList<Language> languagesDisplay = new ArrayList<Language>(numLangs + 2); |
1138 | this.languageAuto = new Language(AUTO, AUTO, AUTO, super.getString(R.string.dictionaryOfflineAutoLang)); |
1139 | languagesDisplay.add(this.languageAuto); |
1140 | + languagesDisplay.add(Language.JAPANESE); |
1141 | for (int i = 0; i < numLangs; i++) { |
1142 | languagesDisplay.add(languagesDictionary.get(i)); |
1143 | } |
1144 | @@ -137,7 +138,6 @@ |
1145 | } else { |
1146 | super.buttonSearch.setTag(BUTTON_DO_SEARCH); |
1147 | } |
1148 | - |
1149 | } |
1150 | |
1151 | @Override |
1152 | @@ -511,11 +511,11 @@ |
1153 | if (0 == numResult) { |
1154 | toastMessage = this.activity.getString(R.string.dictionaryNoResult); |
1155 | } else if (searchComplete) { |
1156 | - String toastMessageTemplate = activity.getString(R.string.toastNumWords); |
1157 | + String toastMessageTemplate = this.activity.getString(R.string.toastNumWords); |
1158 | toastMessage = String.format(toastMessageTemplate, DictionaryOfflineActivity.thread.searchText, |
1159 | numResult); |
1160 | } else { |
1161 | - String toastMessageTemplate = activity.getString(R.string.toastNumWordsInterrupt); |
1162 | + String toastMessageTemplate = this.activity.getString(R.string.toastNumWordsInterrupt); |
1163 | toastMessage = String.format(toastMessageTemplate, DictionaryOfflineActivity.thread.searchText, |
1164 | numResult); |
1165 | } |
1166 | |
1167 | === modified file 'Narau/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java' |
1168 | --- Narau/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java 2012-12-16 19:16:57 +0000 |
1169 | +++ Narau/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java 2012-12-18 18:47:22 +0000 |
1170 | @@ -391,6 +391,7 @@ |
1171 | * |
1172 | * @see ONLINE_DICTS |
1173 | */ |
1174 | + @Override |
1175 | protected void updateButtonSearchText() { |
1176 | if (R.string.dictionaryOnlineUnknown == this.serviceId) { |
1177 | super.buttonSearch.setText(super.getString(R.string.dictionaryOnlineUnknown)); |
1178 | @@ -403,8 +404,9 @@ |
1179 | private static StringBuilder getContent(InputStream iStream) throws IOException { |
1180 | StringBuilder sb = new StringBuilder(); |
1181 | |
1182 | - BufferedReader br = new BufferedReader(new InputStreamReader(iStream, "UTF-8")); |
1183 | - char[] buffer = new char[512]; |
1184 | + final int bufSize = 512; |
1185 | + BufferedReader br = new BufferedReader(new InputStreamReader(iStream, "UTF-8"), bufSize); |
1186 | + final char[] buffer = new char[bufSize]; |
1187 | |
1188 | int read = br.read(buffer); |
1189 | |
1190 | @@ -469,7 +471,7 @@ |
1191 | final String cookieURL = urisInfos[0]; |
1192 | if (null != cookieURL) { |
1193 | |
1194 | - final String serviceName = DictionaryOnlineActivity.this.getString(serviceId); |
1195 | + final String serviceName = DictionaryOnlineActivity.this.getString(this.serviceStringId); |
1196 | HistoryDB historyDB = HistoryDB.getHistoryDB(); |
1197 | |
1198 | CookieStore cookieStore = historyDB.getCookies(serviceName); |
1199 | |
1200 | === modified file 'Narau/src/org/vono/narau/dictionary/HistoryFragment.java' |
1201 | --- Narau/src/org/vono/narau/dictionary/HistoryFragment.java 2012-12-11 22:34:12 +0000 |
1202 | +++ Narau/src/org/vono/narau/dictionary/HistoryFragment.java 2012-12-18 18:47:22 +0000 |
1203 | @@ -92,7 +92,7 @@ |
1204 | |
1205 | public SearchAdapter(Context context, DictionaryType type) { |
1206 | super(context, R.layout.dictionary_search_result_item); |
1207 | - mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
1208 | + this.mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
1209 | // if (android.os.Build.VERSION.SDK_INT >= |
1210 | // android.os.Build.VERSION_CODES.HONEYCOMB) { |
1211 | // super.addAll(HistoryDB.getHistoryDB().getAll()); |
1212 | |
1213 | === modified file 'Narau/src/org/vono/narau/download/DownloaderActivity.java' |
1214 | --- Narau/src/org/vono/narau/download/DownloaderActivity.java 2012-12-16 19:16:57 +0000 |
1215 | +++ Narau/src/org/vono/narau/download/DownloaderActivity.java 2012-12-18 18:47:22 +0000 |
1216 | @@ -390,7 +390,7 @@ |
1217 | } |
1218 | } |
1219 | |
1220 | - if (numSubAvail == 0 && dbInfo.action == Action.none) { |
1221 | + if (numSubAvail == 0 && dbInfo.action == Action.none && null != firstSub) { |
1222 | if (v != dbInfo.checkBox) { |
1223 | // Mark the main db as to be deleted |
1224 | // Rerun all |
1225 | @@ -442,7 +442,7 @@ |
1226 | } |
1227 | } |
1228 | |
1229 | - if (0 == numSubAvail) { |
1230 | + if (0 == numSubAvail && null != firstSub) { |
1231 | if (firstSub.haveLatest()) { |
1232 | firstSub.checkBox.setChecked(false); |
1233 | firstSub.action = Action.none; |
1234 | @@ -748,7 +748,7 @@ |
1235 | tvUpdate.setVisibility(View.GONE); |
1236 | } |
1237 | |
1238 | - } else { |
1239 | + } else if (null != currentMainDB) { |
1240 | viewGroup = (ViewGroup) inflater.inflate(R.layout.download_question_cb_sub, null); |
1241 | DownloaderActivity.genNewViewIds(i, viewGroup); |
1242 | |
1243 | |
1244 | === modified file 'Narau/src/org/vono/narau/download/DownloaderGzipDB.java' |
1245 | --- Narau/src/org/vono/narau/download/DownloaderGzipDB.java 2012-12-09 01:58:19 +0000 |
1246 | +++ Narau/src/org/vono/narau/download/DownloaderGzipDB.java 2012-12-18 18:47:22 +0000 |
1247 | @@ -118,7 +118,7 @@ |
1248 | |
1249 | @Override |
1250 | public int read() throws IOException { |
1251 | - int readByte = in.read(); |
1252 | + int readByte = this.in.read(); |
1253 | if (readByte != -1) { |
1254 | this.readCount++; |
1255 | if (null != this.messageDigest) { |
1256 | @@ -302,7 +302,7 @@ |
1257 | |
1258 | } // for |
1259 | |
1260 | - if (!success && requestStop) { |
1261 | + if (!this.success && requestStop) { |
1262 | dbInfo.file.delete(); |
1263 | } |
1264 | |
1265 | |
1266 | === modified file 'Narau/src/org/vono/narau/exercise/DrillCharActivity.java' |
1267 | --- Narau/src/org/vono/narau/exercise/DrillCharActivity.java 2012-12-12 01:26:48 +0000 |
1268 | +++ Narau/src/org/vono/narau/exercise/DrillCharActivity.java 2012-12-18 18:47:22 +0000 |
1269 | @@ -43,11 +43,11 @@ |
1270 | import android.view.KeyEvent; |
1271 | import android.view.View; |
1272 | import android.view.View.OnClickListener; |
1273 | +import android.view.ViewGroup; |
1274 | import android.widget.Button; |
1275 | import android.widget.ProgressBar; |
1276 | import android.widget.TableLayout; |
1277 | import android.widget.TableRow; |
1278 | -import android.widget.TableRow.LayoutParams; |
1279 | import android.widget.TextView; |
1280 | |
1281 | /** |
1282 | @@ -104,7 +104,7 @@ |
1283 | DrillCharActivity.progressHandler = new ProgressHandler(); |
1284 | } |
1285 | |
1286 | - testState = TestState.ERROR; |
1287 | + this.testState = TestState.ERROR; |
1288 | if (savedInstanceState == null) { |
1289 | // New start |
1290 | if (DrillCharActivity.threadLoadKanji != null) { |
1291 | @@ -123,7 +123,7 @@ |
1292 | final Serializable sIC = extra.getSerializable(KanjiArrayAdapter.ITEM_CATEGORY); |
1293 | final String direction = extra.getString(DrillMenuActivity.DRILL_DIRECTION); |
1294 | if (initDrillQA(sIC, direction)) { |
1295 | - testState = TestState.NEW; |
1296 | + this.testState = TestState.NEW; |
1297 | } |
1298 | } else { |
1299 | // Pass here when there is for example a screen rotation |
1300 | @@ -131,7 +131,7 @@ |
1301 | this.testState = TestState.valueOf(savedInstanceState.getString(ST_TS)); |
1302 | this.testType = TestType.valueOf(savedInstanceState.getString(ST_TT)); |
1303 | |
1304 | - if (testState == TestState.IN_PROGRESS && DrillCharActivity.threadLoadKanji != null |
1305 | + if (this.testState == TestState.IN_PROGRESS && DrillCharActivity.threadLoadKanji != null |
1306 | && DrillCharActivity.progressHandler.activity != null) { |
1307 | DrillCharActivity.progressHandler.setActivity(this); |
1308 | DrillCharActivity.progressHandler.progressDialog = ProgressDialog.show(this, Common.EMPTY_STRING, |
1309 | @@ -139,7 +139,7 @@ |
1310 | } |
1311 | } |
1312 | |
1313 | - switch (testState) { |
1314 | + switch (this.testState) { |
1315 | case DONE: |
1316 | this.initUIResult(); |
1317 | break; |
1318 | @@ -251,7 +251,7 @@ |
1319 | private void initUI(Bundle savedInstanceState) { |
1320 | this.listButtons = new ArrayList<Button>(NUM_ANSWERS); |
1321 | |
1322 | - switch (testType) { |
1323 | + switch (this.testType) { |
1324 | case KANA_ROMANJI: |
1325 | case ROMANJI_KANA: |
1326 | super.setContentView(R.layout.drill_kana); |
1327 | @@ -292,7 +292,7 @@ |
1328 | this.textViewGood = (TextView) super.findViewById(R.id.drillTextViewGoodAnswer); |
1329 | this.textViewBad = (TextView) super.findViewById(R.id.drillTextViewBadAnswer); |
1330 | |
1331 | - if (testType == TestType.ROMANJI_KANA) { |
1332 | + if (this.testType == TestType.ROMANJI_KANA) { |
1333 | this.textViewQuestion.setTextAppearance(super.getApplicationContext(), android.R.attr.textAppearanceLarge); |
1334 | this.textViewQuestion.setTextSize(30.0f); |
1335 | } |
1336 | @@ -354,8 +354,8 @@ |
1337 | final int max = DrillCharActivity.progressHandler.numKanji; |
1338 | final Context context = super.getApplicationContext(); |
1339 | final ArrayList<DrillQA> drillQA = DrillCharActivity.progressHandler.drillQA; |
1340 | - final TableRow.LayoutParams lpTv = new TableRow.LayoutParams(LayoutParams.MATCH_PARENT, |
1341 | - LayoutParams.WRAP_CONTENT, 1 / 3.0f); |
1342 | + final TableRow.LayoutParams lpTv = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
1343 | + ViewGroup.LayoutParams.WRAP_CONTENT, 1 / 3.0f); |
1344 | |
1345 | lpTv.setMargins(0, 3, 0, 3); |
1346 | |
1347 | @@ -421,7 +421,7 @@ |
1348 | Button button = (Button) v; |
1349 | if (dqa.answer != button.getText().toString()) { |
1350 | // Bad response |
1351 | - textViewBad.setText(dqa.question + " ≠ " + button.getText().toString()); |
1352 | + this.textViewBad.setText(dqa.question + " ≠ " + button.getText().toString()); |
1353 | this.textViewBad.setVisibility(View.VISIBLE); |
1354 | dqa.userAnswer = button.getText().toString(); |
1355 | DrillCharActivity.progressHandler.numBadResponse++; |
1356 | @@ -463,6 +463,12 @@ |
1357 | dqa.see = true; |
1358 | } |
1359 | } |
1360 | + |
1361 | + if (null == dqa) { |
1362 | + Log.e(TAG, "nextQuestion: dqa must not be null at this point"); |
1363 | + return; |
1364 | + } |
1365 | + |
1366 | DrillCharActivity.progressHandler.currentTest = dqa; |
1367 | this.textViewQuestion.setText(dqa.question); |
1368 | |
1369 | @@ -546,12 +552,12 @@ |
1370 | super.onSaveInstanceState(savedInstanceState); |
1371 | savedInstanceState.putString(ST_TS, this.testState.name()); |
1372 | savedInstanceState.putString(ST_TT, this.testType.name()); |
1373 | - if (testState != TestState.DONE) { |
1374 | + if (this.testState != TestState.DONE) { |
1375 | savedInstanceState.putCharSequence(ST_TG, this.textViewGood.getText()); |
1376 | savedInstanceState.putCharSequence(ST_TB, this.textViewBad.getText()); |
1377 | ArrayList<CharSequence> buttonsText = new ArrayList<CharSequence>(NUM_ANSWERS); |
1378 | for (int i = 0; i < NUM_ANSWERS; i++) { |
1379 | - buttonsText.add(listButtons.get(i).getText()); |
1380 | + buttonsText.add(this.listButtons.get(i).getText()); |
1381 | } |
1382 | savedInstanceState.putCharSequenceArrayList(ST_BT, buttonsText); |
1383 | } |
1384 | @@ -589,8 +595,8 @@ |
1385 | |
1386 | DrillCharActivity.threadLoadKanji = this; |
1387 | |
1388 | - KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(selection, selectionArgs, true, false, |
1389 | - false); |
1390 | + KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(this.selection, this.selectionArgs, true, |
1391 | + false, false); |
1392 | kanjiIterator.first(); |
1393 | final int num = kanjiIterator.getCount(); |
1394 | |
1395 | |
1396 | === modified file 'Narau/src/org/vono/narau/learn/reading/KanaChartActivity.java' |
1397 | --- Narau/src/org/vono/narau/learn/reading/KanaChartActivity.java 2012-12-09 01:58:19 +0000 |
1398 | +++ Narau/src/org/vono/narau/learn/reading/KanaChartActivity.java 2012-12-18 18:47:22 +0000 |
1399 | @@ -49,9 +49,8 @@ |
1400 | // KanaChartActivity.class.getSimpleName(); |
1401 | |
1402 | static final int TYPE_MASK = KanjiData.KANA_CHART; |
1403 | - |
1404 | + |
1405 | private static HashMap<Common.KanaType, KanaChartActivity.TableScrollView> views; |
1406 | - |
1407 | |
1408 | static { |
1409 | KanaChartActivity.views = new HashMap<Common.KanaType, KanaChartActivity.TableScrollView>(2); |
1410 | @@ -100,12 +99,12 @@ |
1411 | } |
1412 | |
1413 | int count = kanaChartArray.length; |
1414 | - TableRow.LayoutParams lpOne = new TableRow.LayoutParams( |
1415 | - TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT); |
1416 | + TableRow.LayoutParams lpOne = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
1417 | + ViewGroup.LayoutParams.WRAP_CONTENT); |
1418 | lpOne.span = 5; |
1419 | |
1420 | - TableRow.LayoutParams lpSix = new TableRow.LayoutParams( |
1421 | - TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT); |
1422 | + TableRow.LayoutParams lpSix = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
1423 | + ViewGroup.LayoutParams.WRAP_CONTENT); |
1424 | lpSix.setMargins(0, 3, 0, 3); |
1425 | |
1426 | for (int i = 0; i < count; i++) { |
1427 | @@ -128,14 +127,13 @@ |
1428 | TextView tv = new TextView(context); |
1429 | // tv.setBackgroundColor(Color.BLUE); |
1430 | |
1431 | - String romanji = Common.convertKana(line[j], wc.type, |
1432 | - Common.KanaType.ROMANJI); |
1433 | + String romanji = Common.convertKana(line[j], wc.type, Common.KanaType.ROMANJI); |
1434 | tv.setTextSize(30); |
1435 | tv.setGravity(Gravity.CENTER); |
1436 | |
1437 | tv.setText(kana + "\n" + romanji); |
1438 | - LayoutParams lp = new LinearLayout.LayoutParams( |
1439 | - LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, 1.0f); |
1440 | + LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, |
1441 | + ViewGroup.LayoutParams.MATCH_PARENT, 1.0f); |
1442 | tv.setLayoutParams(lp); |
1443 | |
1444 | row.addView(tv, lpSix); |
1445 | @@ -184,7 +182,7 @@ |
1446 | // to make all the kana TextView's have the same size. |
1447 | int tvW = w / 5; |
1448 | if (w > 0) { |
1449 | - for (TextView tv : listTV) { |
1450 | + for (TextView tv : this.listTV) { |
1451 | tv.setWidth(tvW); |
1452 | } |
1453 | } |
1454 | |
1455 | === modified file 'Narau/src/org/vono/narau/learn/reading/KanjiToWordActivity.java' |
1456 | --- Narau/src/org/vono/narau/learn/reading/KanjiToWordActivity.java 2012-12-13 00:54:38 +0000 |
1457 | +++ Narau/src/org/vono/narau/learn/reading/KanjiToWordActivity.java 2012-12-18 18:47:22 +0000 |
1458 | @@ -485,8 +485,8 @@ |
1459 | @Override |
1460 | public void run() { |
1461 | |
1462 | - final KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(selection, selectionArgs, true, |
1463 | - false, true); |
1464 | + final KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(this.selection, this.selectionArgs, |
1465 | + true, false, true); |
1466 | |
1467 | Kanji kanji = kanjiIterator.first(); |
1468 | int count = 0; |
1469 | |
1470 | === modified file 'Narau/src/org/vono/narau/learn/writing/LearnWritingActivity.java' |
1471 | --- Narau/src/org/vono/narau/learn/writing/LearnWritingActivity.java 2012-12-09 01:58:19 +0000 |
1472 | +++ Narau/src/org/vono/narau/learn/writing/LearnWritingActivity.java 2012-12-18 18:47:22 +0000 |
1473 | @@ -452,7 +452,7 @@ |
1474 | |
1475 | @Override |
1476 | public void run() { |
1477 | - final KanjiDB.KanjiSVGIterator kanjiIteratorUnicode = KanjiDB.getKanjiSVGIterator(selection, selectionArgs); |
1478 | + final KanjiDB.KanjiSVGIterator kanjiIteratorUnicode = KanjiDB.getKanjiSVGIterator(this.selection, this.selectionArgs); |
1479 | |
1480 | int codepoint = kanjiIteratorUnicode.first(); |
1481 | while (codepoint != -1) { |
1482 | @@ -492,13 +492,13 @@ |
1483 | |
1484 | @Override |
1485 | public void handleMessage(Message msg) { |
1486 | - if (LOAD_DONE == msg.what && null != activity) { |
1487 | - if (null != activity.progressDialog) { |
1488 | - activity.progressDialog.dismiss(); |
1489 | - activity.progressDialog = null; |
1490 | + if (LOAD_DONE == msg.what && null != this.activity) { |
1491 | + if (null != this.activity.progressDialog) { |
1492 | + this.activity.progressDialog.dismiss(); |
1493 | + this.activity.progressDialog = null; |
1494 | } |
1495 | - activity.currentPosition = 0; |
1496 | - activity.updateCurrentPosition(); |
1497 | + this.activity.currentPosition = 0; |
1498 | + this.activity.updateCurrentPosition(); |
1499 | } |
1500 | } |
1501 | } |
1502 | |
1503 | === modified file 'Narau/src/org/vono/narau/models/dictionary/Entry.java' |
1504 | --- Narau/src/org/vono/narau/models/dictionary/Entry.java 2012-12-11 01:07:49 +0000 |
1505 | +++ Narau/src/org/vono/narau/models/dictionary/Entry.java 2012-12-18 18:47:22 +0000 |
1506 | @@ -33,9 +33,8 @@ |
1507 | * <p> |
1508 | * entry (ent_seq, k_ele*, r_ele+, info?, sense+) |
1509 | * </p> |
1510 | - * Entries consist of kanji elements, reading elements, general information and |
1511 | - * sense elements. Each entry must have at least one reading element and one |
1512 | - * sense element. Others are optional. |
1513 | + * Entries consist of kanji elements, reading elements, general information and sense elements. Each |
1514 | + * entry must have at least one reading element and one sense element. Others are optional. |
1515 | * |
1516 | */ |
1517 | public class Entry implements Comparable<Entry>, Parcelable { |
1518 | @@ -63,8 +62,7 @@ |
1519 | public ArrayList<ReadingElement> r_ele; |
1520 | |
1521 | /** |
1522 | - * The sense element will record the translational equivalent of the |
1523 | - * Japanese word |
1524 | + * The sense element will record the translational equivalent of the Japanese word |
1525 | */ |
1526 | public ArrayList<Sense> senses; |
1527 | |
1528 | @@ -98,7 +96,7 @@ |
1529 | |
1530 | public boolean haveLang(String lang) { |
1531 | if (null != this.senses) { |
1532 | - for (Sense s : senses) { |
1533 | + for (Sense s : this.senses) { |
1534 | if (s.glosses.containsKey(lang)) { |
1535 | return true; |
1536 | } |
1537 | @@ -124,7 +122,7 @@ |
1538 | public String getFirstGloss() { |
1539 | if (null != this.senses) { |
1540 | final ArrayList<Language> languages = Preferences.getLangsPriorities(DatabaseType.dictonary); |
1541 | - for (Sense s : senses) { |
1542 | + for (Sense s : this.senses) { |
1543 | final HashMap<Language, String> glosses = s.glosses; |
1544 | for (Language language : languages) { |
1545 | if (glosses.containsKey(language)) { |
1546 | @@ -353,8 +351,8 @@ |
1547 | |
1548 | /** |
1549 | * Sort for the KanjiToWords<br/> |
1550 | - * This is not a very good sorting method, but it seems to work. At least |
1551 | - * the result is better with than without :-)<br/> |
1552 | + * This is not a very good sorting method, but it seems to work. At least the result is better |
1553 | + * with than without :-)<br/> |
1554 | * This is an ugly code! |
1555 | */ |
1556 | private void makeSortOrder() { |
1557 | @@ -404,6 +402,11 @@ |
1558 | return false; |
1559 | } |
1560 | |
1561 | + @Override |
1562 | + public int hashCode() { |
1563 | + return this.sequence; |
1564 | + } |
1565 | + |
1566 | /** |
1567 | * <p> |
1568 | * Compare the frequencies of this Japanese entry. |
1569 | |
1570 | === modified file 'Narau/src/org/vono/narau/models/history/OnlineResult.java' |
1571 | --- Narau/src/org/vono/narau/models/history/OnlineResult.java 2012-12-13 17:40:21 +0000 |
1572 | +++ Narau/src/org/vono/narau/models/history/OnlineResult.java 2012-12-18 18:47:22 +0000 |
1573 | @@ -86,6 +86,7 @@ |
1574 | return this.service + "\n" + this.sourceLang.displayName + "/" + this.destLang.displayName; |
1575 | } |
1576 | |
1577 | + @SuppressWarnings("cast") |
1578 | @Override |
1579 | public long getId() { |
1580 | return ((long) this.searchTerm.hashCode()) + ((long) this.sourceLang.langISO3.hashCode()) |
1581 | @@ -274,7 +275,7 @@ |
1582 | while (jr.hasNext()) { |
1583 | |
1584 | String name = jr.nextName(); |
1585 | - |
1586 | + |
1587 | if (JsonToken.NULL == jr.peek()) { |
1588 | jr.skipValue(); |
1589 | continue; |
1590 | |
1591 | === modified file 'Narau/src/org/vono/narau/models/history/SearchResult.java' |
1592 | --- Narau/src/org/vono/narau/models/history/SearchResult.java 2012-12-11 22:34:12 +0000 |
1593 | +++ Narau/src/org/vono/narau/models/history/SearchResult.java 2012-12-18 18:47:22 +0000 |
1594 | @@ -77,6 +77,11 @@ |
1595 | return equal; |
1596 | } |
1597 | |
1598 | + @Override |
1599 | + public int hashCode() { |
1600 | + return Long.valueOf(this.getId()).hashCode(); |
1601 | + } |
1602 | + |
1603 | public abstract String getDisplayLanguage(); |
1604 | |
1605 | public abstract long getId(); |
1606 | |
1607 | === modified file 'Narau/src/org/vono/narau/preferences/Preferences.java' |
1608 | --- Narau/src/org/vono/narau/preferences/Preferences.java 2012-12-16 19:56:19 +0000 |
1609 | +++ Narau/src/org/vono/narau/preferences/Preferences.java 2012-12-18 18:47:22 +0000 |
1610 | @@ -305,6 +305,8 @@ |
1611 | case kanji: |
1612 | key = Common.getResourcesString(R.string.prefNameKanjiLangPrio); |
1613 | break; |
1614 | + default: |
1615 | + return; |
1616 | } |
1617 | |
1618 | langsPriorities.put(database, values); |
1619 | |
1620 | === modified file 'Narau/src/org/vono/narau/utils/FontFitTextView.java' |
1621 | --- Narau/src/org/vono/narau/utils/FontFitTextView.java 2012-12-09 01:58:19 +0000 |
1622 | +++ Narau/src/org/vono/narau/utils/FontFitTextView.java 2012-12-18 18:47:22 +0000 |
1623 | @@ -64,10 +64,10 @@ |
1624 | */ |
1625 | private void initComponent() { |
1626 | // Context c, AttributeSet attrs, int defStyle |
1627 | - paint = new Paint(); |
1628 | - paint.setTextSize(10); |
1629 | - paint.setTextAlign(Align.CENTER); |
1630 | - paint.setAntiAlias(true); |
1631 | + this.paint = new Paint(); |
1632 | + this.paint.setTextSize(10); |
1633 | + this.paint.setTextAlign(Align.CENTER); |
1634 | + this.paint.setAntiAlias(true); |
1635 | |
1636 | // FIXME: Get background/foreground colors from style |
1637 | |
1638 | @@ -113,12 +113,12 @@ |
1639 | // TypedArray a = theme.obtainStyledAttributes(attrs, styles, defStyle, |
1640 | // 0); |
1641 | |
1642 | - paint.setColor(Color.WHITE); |
1643 | + this.paint.setColor(Color.WHITE); |
1644 | } |
1645 | |
1646 | public void setFontColor(int c) { |
1647 | // TODO use style to get the text color |
1648 | - paint.setColor(c); |
1649 | + this.paint.setColor(c); |
1650 | } |
1651 | |
1652 | /** |
1653 | @@ -156,8 +156,8 @@ |
1654 | // DisplayMetrics metrics = |
1655 | // super.getContext().getResources().getDisplayMetrics(); |
1656 | |
1657 | - paint.setTextSize(fontSize); |
1658 | - paint.getTextBounds(s, 0, s.length(), rect); |
1659 | + this.paint.setTextSize(fontSize); |
1660 | + this.paint.getTextBounds(s, 0, s.length(), rect); |
1661 | txtWidth = rect.width(); |
1662 | txtHeight = rect.height(); |
1663 | if (txtWidth > availableWidth || txtHeight > availableHeight) { |
1664 | @@ -165,8 +165,8 @@ |
1665 | } |
1666 | |
1667 | while (!gotIt) { |
1668 | - paint.setTextSize(fontSize); |
1669 | - paint.getTextBounds(s, 0, s.length(), rect); |
1670 | + this.paint.setTextSize(fontSize); |
1671 | + this.paint.getTextBounds(s, 0, s.length(), rect); |
1672 | txtWidth = rect.width(); |
1673 | txtHeight = rect.height(); |
1674 | |
1675 | @@ -258,7 +258,7 @@ |
1676 | String text = getText().toString(); |
1677 | if (text.length() > 0) { |
1678 | calcTextSize(text, canvas); |
1679 | - canvas.drawText(text, calcStartDrawingPosX(), calcStartDrawingPosY(), paint); |
1680 | + canvas.drawText(text, calcStartDrawingPosX(), calcStartDrawingPosY(), this.paint); |
1681 | } |
1682 | }; |
1683 | |
1684 | |
1685 | === modified file 'Narau/src/org/vono/narau/utils/JsonReader.java' |
1686 | --- Narau/src/org/vono/narau/utils/JsonReader.java 2012-12-08 02:05:54 +0000 |
1687 | +++ Narau/src/org/vono/narau/utils/JsonReader.java 2012-12-18 18:47:22 +0000 |
1688 | @@ -321,16 +321,16 @@ |
1689 | * Returns the type of the next token without consuming it. |
1690 | */ |
1691 | public JsonToken peek() throws IOException { |
1692 | - if (token != null) { |
1693 | - return token; |
1694 | + if (this.token != null) { |
1695 | + return this.token; |
1696 | } |
1697 | |
1698 | switch (peekStack()) { |
1699 | case EMPTY_DOCUMENT: |
1700 | replaceTop(JsonScope.NONEMPTY_DOCUMENT); |
1701 | JsonToken firstToken = nextValue(); |
1702 | - if (!lenient && token != JsonToken.BEGIN_ARRAY && token != JsonToken.BEGIN_OBJECT) { |
1703 | - throw new IOException("Expected JSON document to start with '[' or '{' but was " + token); |
1704 | + if (!this.lenient && this.token != JsonToken.BEGIN_ARRAY && this.token != JsonToken.BEGIN_OBJECT) { |
1705 | + throw new IOException("Expected JSON document to start with '[' or '{' but was " + this.token); |
1706 | } |
1707 | return firstToken; |
1708 | case EMPTY_ARRAY: |
1709 | @@ -484,7 +484,7 @@ |
1710 | } catch (NumberFormatException ignored) { |
1711 | double asDouble = Double.parseDouble(value); // don't catch this NumberFormatException |
1712 | result = (long) asDouble; |
1713 | - if ((double) result != asDouble) { |
1714 | + if (result != asDouble) { |
1715 | throw new NumberFormatException(value); |
1716 | } |
1717 | } |
1718 | @@ -516,7 +516,7 @@ |
1719 | } catch (NumberFormatException ignored) { |
1720 | double asDouble = Double.parseDouble(value); // don't catch this NumberFormatException |
1721 | result = (int) asDouble; |
1722 | - if ((double) result != asDouble) { |
1723 | + if (result != asDouble) { |
1724 | throw new NumberFormatException(value); |
1725 | } |
1726 | } |
1727 | |
1728 | === modified file 'Narau/src/org/vono/narau/utils/Language.java' |
1729 | --- Narau/src/org/vono/narau/utils/Language.java 2012-12-16 19:16:57 +0000 |
1730 | +++ Narau/src/org/vono/narau/utils/Language.java 2012-12-18 18:47:22 +0000 |
1731 | @@ -115,7 +115,7 @@ |
1732 | |
1733 | @Override |
1734 | public int hashCode() { |
1735 | - return langISO3.hashCode() + displayName.hashCode(); |
1736 | + return this.langISO3.hashCode() + this.displayName.hashCode(); |
1737 | } |
1738 | |
1739 | @Override |
1740 | |
1741 | === modified file 'Narau/src/org/vono/narau/utils/StringPool.java' |
1742 | --- Narau/src/org/vono/narau/utils/StringPool.java 2012-12-09 01:58:19 +0000 |
1743 | +++ Narau/src/org/vono/narau/utils/StringPool.java 2012-12-18 18:47:22 +0000 |
1744 | @@ -52,15 +52,15 @@ |
1745 | // Pick a bucket using Doug Lea's supplemental secondaryHash function (from HashMap) |
1746 | hashCode ^= (hashCode >>> 20) ^ (hashCode >>> 12); |
1747 | hashCode ^= (hashCode >>> 7) ^ (hashCode >>> 4); |
1748 | - int index = hashCode & (pool.length - 1); |
1749 | + int index = hashCode & (this.pool.length - 1); |
1750 | |
1751 | - String pooled = pool[index]; |
1752 | + String pooled = this.pool[index]; |
1753 | if (pooled != null && contentEquals(pooled, array, start, length)) { |
1754 | return pooled; |
1755 | } |
1756 | |
1757 | String result = new String(array, start, length); |
1758 | - pool[index] = result; |
1759 | + this.pool[index] = result; |
1760 | return result; |
1761 | } |
1762 | } |
1763 | \ No newline at end of file |
1764 | |
1765 | === modified file 'NarauCupcake/.settings/org.eclipse.jdt.core.prefs' |
1766 | --- NarauCupcake/.settings/org.eclipse.jdt.core.prefs 2012-11-27 14:41:06 +0000 |
1767 | +++ NarauCupcake/.settings/org.eclipse.jdt.core.prefs 2012-12-18 18:47:22 +0000 |
1768 | @@ -1,4 +1,11 @@ |
1769 | eclipse.preferences.version=1 |
1770 | +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled |
1771 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 |
1772 | +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve |
1773 | org.eclipse.jdt.core.compiler.compliance=1.5 |
1774 | +org.eclipse.jdt.core.compiler.debug.lineNumber=generate |
1775 | +org.eclipse.jdt.core.compiler.debug.localVariable=generate |
1776 | +org.eclipse.jdt.core.compiler.debug.sourceFile=generate |
1777 | +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error |
1778 | +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error |
1779 | org.eclipse.jdt.core.compiler.source=1.5 |
1780 | |
1781 | === modified file 'NarauCupcake/AndroidManifest.xml' |
1782 | --- NarauCupcake/AndroidManifest.xml 2012-12-15 23:46:16 +0000 |
1783 | +++ NarauCupcake/AndroidManifest.xml 2012-12-18 18:47:22 +0000 |
1784 | @@ -17,8 +17,8 @@ |
1785 | --> |
1786 | <manifest xmlns:android="http://schemas.android.com/apk/res/android" |
1787 | package="org.vono.narau" |
1788 | - android:versionCode="5" |
1789 | - android:versionName="0.8" > |
1790 | + android:versionCode="6" |
1791 | + android:versionName="0.8.1" > |
1792 | |
1793 | <!-- Permissions needed to download the database --> |
1794 | <uses-permission android:name="android.permission.INTERNET" /> |
1795 | |
1796 | === added file 'NarauCupcake/res/drawable-hdpi/ic_erase.png' |
1797 | Binary files NarauCupcake/res/drawable-hdpi/ic_erase.png 1970-01-01 00:00:00 +0000 and NarauCupcake/res/drawable-hdpi/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
1798 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_media_next.png' |
1799 | Binary files NarauCupcake/res/drawable-hdpi/ic_media_next.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
1800 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_media_play.png' |
1801 | Binary files NarauCupcake/res/drawable-hdpi/ic_media_play.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
1802 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_media_previous.png' |
1803 | Binary files NarauCupcake/res/drawable-hdpi/ic_media_previous.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
1804 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_menu_dictionary_offline.png' |
1805 | Binary files NarauCupcake/res/drawable-hdpi/ic_menu_dictionary_offline.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
1806 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_menu_dictionary_online.png' |
1807 | Binary files NarauCupcake/res/drawable-hdpi/ic_menu_dictionary_online.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
1808 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_menu_drill_from_japanese.png' |
1809 | Binary files NarauCupcake/res/drawable-hdpi/ic_menu_drill_from_japanese.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
1810 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_menu_drill_to_japanese.png' |
1811 | Binary files NarauCupcake/res/drawable-hdpi/ic_menu_drill_to_japanese.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
1812 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_menu_reading.png' |
1813 | Binary files NarauCupcake/res/drawable-hdpi/ic_menu_reading.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
1814 | === modified file 'NarauCupcake/res/drawable-hdpi/ic_menu_writing.png' |
1815 | Binary files NarauCupcake/res/drawable-hdpi/ic_menu_writing.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-hdpi/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
1816 | === added file 'NarauCupcake/res/drawable-ldpi/ic_erase.png' |
1817 | Binary files NarauCupcake/res/drawable-ldpi/ic_erase.png 1970-01-01 00:00:00 +0000 and NarauCupcake/res/drawable-ldpi/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
1818 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_media_next.png' |
1819 | Binary files NarauCupcake/res/drawable-ldpi/ic_media_next.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
1820 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_media_play.png' |
1821 | Binary files NarauCupcake/res/drawable-ldpi/ic_media_play.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
1822 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_media_previous.png' |
1823 | Binary files NarauCupcake/res/drawable-ldpi/ic_media_previous.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
1824 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_menu_dictionary_offline.png' |
1825 | Binary files NarauCupcake/res/drawable-ldpi/ic_menu_dictionary_offline.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
1826 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_menu_dictionary_online.png' |
1827 | Binary files NarauCupcake/res/drawable-ldpi/ic_menu_dictionary_online.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
1828 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_menu_drill_from_japanese.png' |
1829 | Binary files NarauCupcake/res/drawable-ldpi/ic_menu_drill_from_japanese.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
1830 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_menu_drill_to_japanese.png' |
1831 | Binary files NarauCupcake/res/drawable-ldpi/ic_menu_drill_to_japanese.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
1832 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_menu_reading.png' |
1833 | Binary files NarauCupcake/res/drawable-ldpi/ic_menu_reading.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
1834 | === modified file 'NarauCupcake/res/drawable-ldpi/ic_menu_writing.png' |
1835 | Binary files NarauCupcake/res/drawable-ldpi/ic_menu_writing.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable-ldpi/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
1836 | === added file 'NarauCupcake/res/drawable/ic_erase.png' |
1837 | Binary files NarauCupcake/res/drawable/ic_erase.png 1970-01-01 00:00:00 +0000 and NarauCupcake/res/drawable/ic_erase.png 2012-12-18 18:47:22 +0000 differ |
1838 | === modified file 'NarauCupcake/res/drawable/ic_media_next.png' |
1839 | Binary files NarauCupcake/res/drawable/ic_media_next.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_media_next.png 2012-12-18 18:47:22 +0000 differ |
1840 | === modified file 'NarauCupcake/res/drawable/ic_media_play.png' |
1841 | Binary files NarauCupcake/res/drawable/ic_media_play.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_media_play.png 2012-12-18 18:47:22 +0000 differ |
1842 | === modified file 'NarauCupcake/res/drawable/ic_media_previous.png' |
1843 | Binary files NarauCupcake/res/drawable/ic_media_previous.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_media_previous.png 2012-12-18 18:47:22 +0000 differ |
1844 | === modified file 'NarauCupcake/res/drawable/ic_menu_dictionary_offline.png' |
1845 | Binary files NarauCupcake/res/drawable/ic_menu_dictionary_offline.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_menu_dictionary_offline.png 2012-12-18 18:47:22 +0000 differ |
1846 | === modified file 'NarauCupcake/res/drawable/ic_menu_dictionary_online.png' |
1847 | Binary files NarauCupcake/res/drawable/ic_menu_dictionary_online.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_menu_dictionary_online.png 2012-12-18 18:47:22 +0000 differ |
1848 | === modified file 'NarauCupcake/res/drawable/ic_menu_drill_from_japanese.png' |
1849 | Binary files NarauCupcake/res/drawable/ic_menu_drill_from_japanese.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_menu_drill_from_japanese.png 2012-12-18 18:47:22 +0000 differ |
1850 | === modified file 'NarauCupcake/res/drawable/ic_menu_drill_to_japanese.png' |
1851 | Binary files NarauCupcake/res/drawable/ic_menu_drill_to_japanese.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_menu_drill_to_japanese.png 2012-12-18 18:47:22 +0000 differ |
1852 | === modified file 'NarauCupcake/res/drawable/ic_menu_reading.png' |
1853 | Binary files NarauCupcake/res/drawable/ic_menu_reading.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_menu_reading.png 2012-12-18 18:47:22 +0000 differ |
1854 | === modified file 'NarauCupcake/res/drawable/ic_menu_writing.png' |
1855 | Binary files NarauCupcake/res/drawable/ic_menu_writing.png 2012-12-15 23:46:16 +0000 and NarauCupcake/res/drawable/ic_menu_writing.png 2012-12-18 18:47:22 +0000 differ |
1856 | === modified file 'NarauCupcake/res/layout-land/download.xml' |
1857 | --- NarauCupcake/res/layout-land/download.xml 2012-12-15 23:46:16 +0000 |
1858 | +++ NarauCupcake/res/layout-land/download.xml 2012-12-18 18:47:22 +0000 |
1859 | @@ -84,7 +84,7 @@ |
1860 | android:layout_height="wrap_content" |
1861 | android:layout_gravity="center_horizontal" |
1862 | android:layout_marginTop="15dp" |
1863 | - android:drawableLeft="@android:drawable/ic_delete" |
1864 | + android:drawableLeft="@drawable/ic_erase" |
1865 | android:onClick="onClickButtonCancel" |
1866 | android:text="@android:string/cancel" /> |
1867 | |
1868 | |
1869 | === modified file 'NarauCupcake/res/layout-land/learn_writing.xml' |
1870 | --- NarauCupcake/res/layout-land/learn_writing.xml 2012-12-15 23:46:16 +0000 |
1871 | +++ NarauCupcake/res/layout-land/learn_writing.xml 2012-12-18 18:47:22 +0000 |
1872 | @@ -59,7 +59,7 @@ |
1873 | android:layout_height="wrap_content" |
1874 | android:contentDescription="@string/clear" |
1875 | android:onClick="clearUserDrawing" |
1876 | - android:src="@android:drawable/ic_delete" /> |
1877 | + android:src="@drawable/ic_erase" /> |
1878 | |
1879 | <ImageButton |
1880 | android:id="@+id/learnWritingButtonNext" |
1881 | |
1882 | === modified file 'NarauCupcake/res/layout/download.xml' |
1883 | --- NarauCupcake/res/layout/download.xml 2012-12-15 23:46:16 +0000 |
1884 | +++ NarauCupcake/res/layout/download.xml 2012-12-18 18:47:22 +0000 |
1885 | @@ -89,7 +89,7 @@ |
1886 | android:layout_height="wrap_content" |
1887 | android:layout_gravity="center_horizontal" |
1888 | android:layout_marginTop="15dp" |
1889 | - android:drawableLeft="@android:drawable/ic_delete" |
1890 | + android:drawableLeft="@drawable/ic_erase" |
1891 | android:onClick="onClickButtonCancel" |
1892 | android:text="@android:string/cancel" /> |
1893 | |
1894 | |
1895 | === modified file 'NarauCupcake/res/layout/kanji_to_words.xml' |
1896 | --- NarauCupcake/res/layout/kanji_to_words.xml 2012-12-15 23:46:16 +0000 |
1897 | +++ NarauCupcake/res/layout/kanji_to_words.xml 2012-12-18 18:47:22 +0000 |
1898 | @@ -40,7 +40,7 @@ |
1899 | android:layout_width="0dp" |
1900 | android:layout_height="wrap_content" |
1901 | android:layout_weight="1" |
1902 | - android:gravity="center_horizontal" |
1903 | + android:gravity="center" |
1904 | android:lines="2" |
1905 | android:textAppearance="?android:attr/textAppearanceLarge" > |
1906 | </TextView> |
1907 | |
1908 | === modified file 'NarauCupcake/res/layout/learn_writing.xml' |
1909 | --- NarauCupcake/res/layout/learn_writing.xml 2012-12-15 23:46:16 +0000 |
1910 | +++ NarauCupcake/res/layout/learn_writing.xml 2012-12-18 18:47:22 +0000 |
1911 | @@ -73,7 +73,7 @@ |
1912 | android:contentDescription="@string/clear" |
1913 | android:onClick="clearUserDrawing" |
1914 | android:scaleType="fitCenter" |
1915 | - android:src="@android:drawable/ic_delete" /> |
1916 | + android:src="@drawable/ic_erase" /> |
1917 | |
1918 | <ImageButton |
1919 | android:id="@+id/learnWritingButtonNext" |
1920 | |
1921 | === modified file 'NarauCupcake/res/values/values.xml' |
1922 | --- NarauCupcake/res/values/values.xml 2012-12-16 19:56:19 +0000 |
1923 | +++ NarauCupcake/res/values/values.xml 2012-12-18 18:47:22 +0000 |
1924 | @@ -1,6 +1,7 @@ |
1925 | <?xml version="1.0" encoding="utf-8"?> |
1926 | <resources xmlns:android="http://schemas.android.com/apk/res/android"> |
1927 | |
1928 | + <!-- http://192.168.3.1/narau/narau_db_infos_ip.txt --> |
1929 | <item name="db_infos_url" type="string">https://bazaar.launchpad.net/~vono22/narau/fdroid/view/head:/NarauDBInfo/narau_db_infos.txt</item> |
1930 | <!-- Preferences names --> |
1931 | <item name="prefNameVersion" type="string">version</item> |
1932 | |
1933 | === modified file 'NarauCupcake/src/android/compat/view/MenuCompat.java' |
1934 | --- NarauCupcake/src/android/compat/view/MenuCompat.java 2012-12-16 19:16:57 +0000 |
1935 | +++ NarauCupcake/src/android/compat/view/MenuCompat.java 2012-12-18 18:47:22 +0000 |
1936 | @@ -100,6 +100,7 @@ |
1937 | return null; |
1938 | } |
1939 | |
1940 | + @SuppressWarnings("unqualified-field-access") |
1941 | private static class MenuInfos implements MenuBuilder.Callback { |
1942 | private MenuBuilder menuBuilder; |
1943 | private DecorView frameLayout; |
1944 | |
1945 | === modified file 'NarauCupcake/src/android/compat/view/MenuInflater.java' |
1946 | --- NarauCupcake/src/android/compat/view/MenuInflater.java 2012-12-15 23:46:16 +0000 |
1947 | +++ NarauCupcake/src/android/compat/view/MenuInflater.java 2012-12-18 18:47:22 +0000 |
1948 | @@ -42,6 +42,7 @@ |
1949 | * XmlPullParser over a plain XML file at runtime; it only works with an XmlPullParser returned from |
1950 | * a compiled resource (R. <em>something</em> file.) |
1951 | */ |
1952 | +@SuppressWarnings("unqualified-field-access") |
1953 | public class MenuInflater { |
1954 | /** Menu tag name in XML. */ |
1955 | private static final String XML_MENU = "menu"; |
1956 | |
1957 | === modified file 'NarauCupcake/src/android/compat/view/menu/IconMenuItemView.java' |
1958 | --- NarauCupcake/src/android/compat/view/menu/IconMenuItemView.java 2012-12-15 23:46:16 +0000 |
1959 | +++ NarauCupcake/src/android/compat/view/menu/IconMenuItemView.java 2012-12-18 18:47:22 +0000 |
1960 | @@ -32,6 +32,7 @@ |
1961 | /** |
1962 | * The item view for each item in the {@link IconMenuView}. |
1963 | */ |
1964 | +@SuppressWarnings("unqualified-field-access") |
1965 | public final class IconMenuItemView extends TextView implements MenuView.ItemView { |
1966 | |
1967 | private static final int NO_ALPHA = 0xFF; |
1968 | |
1969 | === modified file 'NarauCupcake/src/android/compat/view/menu/IconMenuView.java' |
1970 | --- NarauCupcake/src/android/compat/view/menu/IconMenuView.java 2012-12-15 23:46:16 +0000 |
1971 | +++ NarauCupcake/src/android/compat/view/menu/IconMenuView.java 2012-12-18 18:47:22 +0000 |
1972 | @@ -46,6 +46,7 @@ |
1973 | * @attr ref android.R.styleable#IconMenuView_maxItemsPerRow |
1974 | * |
1975 | */ |
1976 | +@SuppressWarnings("unqualified-field-access") |
1977 | public final class IconMenuView extends ViewGroup implements ItemInvoker, MenuView, Runnable { |
1978 | private static final int ITEM_CAPTION_CYCLE_DELAY = 1000; |
1979 | |
1980 | |
1981 | === modified file 'NarauCupcake/src/android/compat/view/menu/MenuBuilder.java' |
1982 | --- NarauCupcake/src/android/compat/view/menu/MenuBuilder.java 2012-12-15 23:46:16 +0000 |
1983 | +++ NarauCupcake/src/android/compat/view/menu/MenuBuilder.java 2012-12-18 18:47:22 +0000 |
1984 | @@ -47,6 +47,7 @@ |
1985 | /** |
1986 | * Implementation of the {@link android.view.Menu} interface for creating a standard menu UI. |
1987 | */ |
1988 | +@SuppressWarnings("unqualified-field-access") |
1989 | public class MenuBuilder implements Menu { |
1990 | // private static final String LOGTAG = "MenuBuilder"; |
1991 | |
1992 | @@ -60,7 +61,7 @@ |
1993 | * The menu type that represents a menu dialog. Examples are context and sub menus. This menu |
1994 | * type will not have a corresponding MenuView, but it will have an ItemView. |
1995 | */ |
1996 | - public static final int TYPE_DIALOG = 2; |
1997 | + public static final int TYmActivityPE_DIALOG = 2; |
1998 | |
1999 | private static final String VIEWS_TAG = "android:views"; |
2000 | |
2001 | |
2002 | === modified file 'NarauCupcake/src/android/compat/view/menu/MenuItemImpl.java' |
2003 | --- NarauCupcake/src/android/compat/view/menu/MenuItemImpl.java 2012-12-15 23:46:16 +0000 |
2004 | +++ NarauCupcake/src/android/compat/view/menu/MenuItemImpl.java 2012-12-18 18:47:22 +0000 |
2005 | @@ -29,7 +29,7 @@ |
2006 | import android.view.ViewDebug; |
2007 | import android.view.ViewGroup; |
2008 | |
2009 | - |
2010 | +@SuppressWarnings("unqualified-field-access") |
2011 | public final class MenuItemImpl implements MenuItem { |
2012 | private final int mId; |
2013 | private final int mGroup; |
2014 | |
2015 | === modified file 'NarauCupcake/src/android/compat/view/menu/SubMenuBuilder.java' |
2016 | --- NarauCupcake/src/android/compat/view/menu/SubMenuBuilder.java 2012-12-15 23:46:16 +0000 |
2017 | +++ NarauCupcake/src/android/compat/view/menu/SubMenuBuilder.java 2012-12-18 18:47:22 +0000 |
2018 | @@ -27,6 +27,7 @@ |
2019 | * The model for a sub menu, which is an extension of the menu. Most methods are proxied to |
2020 | * the parent menu. |
2021 | */ |
2022 | +@SuppressWarnings("unqualified-field-access") |
2023 | public class SubMenuBuilder extends MenuBuilder implements SubMenu { |
2024 | private MenuBuilder mParentMenu; |
2025 | private MenuItemImpl mItem; |
2026 | |
2027 | === modified file 'NarauCupcake/src/android/support/v4/app/BackStackRecord.java' |
2028 | --- NarauCupcake/src/android/support/v4/app/BackStackRecord.java 2012-11-21 00:38:43 +0000 |
2029 | +++ NarauCupcake/src/android/support/v4/app/BackStackRecord.java 2012-12-18 18:47:22 +0000 |
2030 | @@ -27,6 +27,7 @@ |
2031 | import java.io.PrintWriter; |
2032 | import java.util.ArrayList; |
2033 | |
2034 | +@SuppressWarnings("unqualified-field-access") |
2035 | final class BackStackState implements Parcelable { |
2036 | final int[] mOps; |
2037 | final int mTransition; |
2038 | @@ -168,6 +169,7 @@ |
2039 | /** |
2040 | * @hide Entry of an operation on the fragment back stack. |
2041 | */ |
2042 | +@SuppressWarnings("unqualified-field-access") |
2043 | final class BackStackRecord extends FragmentTransaction implements FragmentManager.BackStackEntry, Runnable { |
2044 | static final String TAG = "BackStackEntry"; |
2045 | |
2046 | |
2047 | === modified file 'NarauCupcake/src/android/support/v4/app/DialogFragment.java' |
2048 | --- NarauCupcake/src/android/support/v4/app/DialogFragment.java 2012-11-21 00:38:43 +0000 |
2049 | +++ NarauCupcake/src/android/support/v4/app/DialogFragment.java 2012-12-18 18:47:22 +0000 |
2050 | @@ -36,6 +36,7 @@ |
2051 | * implementation is still used; it does not try to switch to the framework's |
2052 | * implementation. See the framework SDK documentation for a class overview. |
2053 | */ |
2054 | +@SuppressWarnings("unqualified-field-access") |
2055 | public class DialogFragment extends Fragment implements DialogInterface.OnCancelListener, |
2056 | DialogInterface.OnDismissListener { |
2057 | |
2058 | |
2059 | === modified file 'NarauCupcake/src/android/support/v4/app/Fragment.java' |
2060 | --- NarauCupcake/src/android/support/v4/app/Fragment.java 2012-11-21 00:38:43 +0000 |
2061 | +++ NarauCupcake/src/android/support/v4/app/Fragment.java 2012-12-18 18:47:22 +0000 |
2062 | @@ -47,6 +47,7 @@ |
2063 | import java.io.PrintWriter; |
2064 | import java.util.HashMap; |
2065 | |
2066 | +@SuppressWarnings("unqualified-field-access") |
2067 | final class FragmentState implements Parcelable { |
2068 | final String mClassName; |
2069 | final int mIndex; |
2070 | @@ -147,12 +148,12 @@ |
2071 | } |
2072 | |
2073 | /** |
2074 | - * Static library support version of the framework's |
2075 | - * {@link android.app.Fragment}. Used to write apps that run on platforms prior |
2076 | - * to Android 3.0. When running on Android 3.0 or above, this implementation is |
2077 | - * still used; it does not try to switch to the framework's implementation. See |
2078 | + * Static library support version of the framework's {@link android.app.Fragment}. Used to write |
2079 | + * apps that run on platforms prior to Android 3.0. When running on Android 3.0 or above, this |
2080 | + * implementation is still used; it does not try to switch to the framework's implementation. See |
2081 | * the framework SDK documentation for a class overview. |
2082 | */ |
2083 | +@SuppressWarnings("unqualified-field-access") |
2084 | public class Fragment implements ComponentCallbacks, OnCreateContextMenuListener { |
2085 | private static final HashMap<String, Class<?>> sClassMap = new HashMap<String, Class<?>>(); |
2086 | |
2087 | @@ -288,8 +289,8 @@ |
2088 | boolean mCheckedForLoaderManager; |
2089 | |
2090 | /** |
2091 | - * State information that has been retrieved from a fragment instance |
2092 | - * through {@link FragmentManager#saveFragmentInstanceState(Fragment) |
2093 | + * State information that has been retrieved from a fragment instance through |
2094 | + * {@link FragmentManager#saveFragmentInstanceState(Fragment) |
2095 | * FragmentManager.saveFragmentInstanceState}. |
2096 | */ |
2097 | public static class SavedState implements Parcelable { |
2098 | @@ -326,8 +327,8 @@ |
2099 | } |
2100 | |
2101 | /** |
2102 | - * Thrown by {@link Fragment#instantiate(Context, String, Bundle)} when |
2103 | - * there is an instantiation failure. |
2104 | + * Thrown by {@link Fragment#instantiate(Context, String, Bundle)} when there is an |
2105 | + * instantiation failure. |
2106 | */ |
2107 | static public class InstantiationException extends RuntimeException { |
2108 | /** |
2109 | @@ -341,51 +342,46 @@ |
2110 | } |
2111 | |
2112 | /** |
2113 | - * Default constructor. <strong>Every</strong> fragment must have an empty |
2114 | - * constructor, so it can be instantiated when restoring its activity's |
2115 | - * state. It is strongly recommended that subclasses do not have other |
2116 | - * constructors with parameters, since these constructors will not be called |
2117 | - * when the fragment is re-instantiated; instead, arguments can be supplied |
2118 | - * by the caller with {@link #setArguments} and later retrieved by the |
2119 | - * Fragment with {@link #getArguments}. |
2120 | + * Default constructor. <strong>Every</strong> fragment must have an empty constructor, so it |
2121 | + * can be instantiated when restoring its activity's state. It is strongly recommended that |
2122 | + * subclasses do not have other constructors with parameters, since these constructors will not |
2123 | + * be called when the fragment is re-instantiated; instead, arguments can be supplied by the |
2124 | + * caller with {@link #setArguments} and later retrieved by the Fragment with |
2125 | + * {@link #getArguments}. |
2126 | * |
2127 | * <p> |
2128 | - * Applications should generally not implement a constructor. The first |
2129 | - * place application code an run where the fragment is ready to be used is |
2130 | - * in {@link #onAttach(Activity)}, the point where the fragment is actually |
2131 | - * associated with its activity. Some applications may also want to |
2132 | - * implement {@link #onInflate} to retrieve attributes from a layout |
2133 | - * resource, though should take care here because this happens for the |
2134 | - * fragment is attached to its activity. |
2135 | + * Applications should generally not implement a constructor. The first place application code |
2136 | + * an run where the fragment is ready to be used is in {@link #onAttach(Activity)}, the point |
2137 | + * where the fragment is actually associated with its activity. Some applications may also want |
2138 | + * to implement {@link #onInflate} to retrieve attributes from a layout resource, though should |
2139 | + * take care here because this happens for the fragment is attached to its activity. |
2140 | */ |
2141 | public Fragment() { |
2142 | } |
2143 | |
2144 | /** |
2145 | - * Like {@link #instantiate(Context, String, Bundle)} but with a null |
2146 | - * argument Bundle. |
2147 | + * Like {@link #instantiate(Context, String, Bundle)} but with a null argument Bundle. |
2148 | */ |
2149 | public static Fragment instantiate(Context context, String fname) { |
2150 | return instantiate(context, fname, null); |
2151 | } |
2152 | |
2153 | /** |
2154 | - * Create a new instance of a Fragment with the given class name. This is |
2155 | - * the same as calling its empty constructor. |
2156 | + * Create a new instance of a Fragment with the given class name. This is the same as calling |
2157 | + * its empty constructor. |
2158 | * |
2159 | * @param context |
2160 | - * The calling context being used to instantiate the fragment. |
2161 | - * This is currently just used to get its ClassLoader. |
2162 | + * The calling context being used to instantiate the fragment. This is currently just |
2163 | + * used to get its ClassLoader. |
2164 | * @param fname |
2165 | * The class name of the fragment to instantiate. |
2166 | * @param args |
2167 | - * Bundle of arguments to supply to the fragment, which it can |
2168 | - * retrieve with {@link #getArguments()}. May be null. |
2169 | + * Bundle of arguments to supply to the fragment, which it can retrieve with |
2170 | + * {@link #getArguments()}. May be null. |
2171 | * @return Returns a new fragment instance. |
2172 | * @throws InstantiationException |
2173 | - * If there is a failure in instantiating the given fragment |
2174 | - * class. This is a runtime exception; it is not normally |
2175 | - * expected to happen. |
2176 | + * If there is a failure in instantiating the given fragment class. This is a |
2177 | + * runtime exception; it is not normally expected to happen. |
2178 | */ |
2179 | public static Fragment instantiate(Context context, String fname, Bundle args) { |
2180 | try { |
2181 | @@ -467,9 +463,8 @@ |
2182 | } |
2183 | |
2184 | /** |
2185 | - * Return the identifier this fragment is known by. This is either the |
2186 | - * android:id value supplied in a layout or the container view ID supplied |
2187 | - * when adding the fragment. |
2188 | + * Return the identifier this fragment is known by. This is either the android:id value supplied |
2189 | + * in a layout or the container view ID supplied when adding the fragment. |
2190 | */ |
2191 | final public int getId() { |
2192 | return mFragmentId; |
2193 | @@ -483,11 +478,10 @@ |
2194 | } |
2195 | |
2196 | /** |
2197 | - * Supply the construction arguments for this fragment. This can only be |
2198 | - * called before the fragment has been attached to its activity; that is, |
2199 | - * you should call it immediately after constructing the fragment. The |
2200 | - * arguments supplied here will be retained across fragment destroy and |
2201 | - * creation. |
2202 | + * Supply the construction arguments for this fragment. This can only be called before the |
2203 | + * fragment has been attached to its activity; that is, you should call it immediately after |
2204 | + * constructing the fragment. The arguments supplied here will be retained across fragment |
2205 | + * destroy and creation. |
2206 | */ |
2207 | public void setArguments(Bundle args) { |
2208 | if (mIndex >= 0) { |
2209 | @@ -504,9 +498,8 @@ |
2210 | } |
2211 | |
2212 | /** |
2213 | - * Set the initial saved state that this Fragment should restore itself from |
2214 | - * when first being constructed, as returned by |
2215 | - * {@link FragmentManager#saveFragmentInstanceState(Fragment) |
2216 | + * Set the initial saved state that this Fragment should restore itself from when first being |
2217 | + * constructed, as returned by {@link FragmentManager#saveFragmentInstanceState(Fragment) |
2218 | * FragmentManager.saveFragmentInstanceState}. |
2219 | * |
2220 | * @param state |
2221 | @@ -520,17 +513,16 @@ |
2222 | } |
2223 | |
2224 | /** |
2225 | - * Optional target for this fragment. This may be used, for example, if this |
2226 | - * fragment is being started by another, and when done wants to give a |
2227 | - * result back to the first. The target set here is retained across |
2228 | - * instances via {@link FragmentManager#putFragment |
2229 | + * Optional target for this fragment. This may be used, for example, if this fragment is being |
2230 | + * started by another, and when done wants to give a result back to the first. The target set |
2231 | + * here is retained across instances via {@link FragmentManager#putFragment |
2232 | * FragmentManager.putFragment()}. |
2233 | * |
2234 | * @param fragment |
2235 | * The fragment that is the target of this one. |
2236 | * @param requestCode |
2237 | - * Optional request code, for convenience if you are going to |
2238 | - * call back with {@link #onActivityResult(int, int, Intent)}. |
2239 | + * Optional request code, for convenience if you are going to call back with |
2240 | + * {@link #onActivityResult(int, int, Intent)}. |
2241 | */ |
2242 | public void setTargetFragment(Fragment fragment, int requestCode) { |
2243 | mTarget = fragment; |
2244 | @@ -569,8 +561,8 @@ |
2245 | } |
2246 | |
2247 | /** |
2248 | - * Return a localized, styled CharSequence from the application's package's |
2249 | - * default string table. |
2250 | + * Return a localized, styled CharSequence from the application's package's default string |
2251 | + * table. |
2252 | * |
2253 | * @param resId |
2254 | * Resource id for the CharSequence text |
2255 | @@ -580,8 +572,7 @@ |
2256 | } |
2257 | |
2258 | /** |
2259 | - * Return a localized string from the application's package's default string |
2260 | - * table. |
2261 | + * Return a localized string from the application's package's default string table. |
2262 | * |
2263 | * @param resId |
2264 | * Resource id for the string |
2265 | @@ -591,9 +582,9 @@ |
2266 | } |
2267 | |
2268 | /** |
2269 | - * Return a localized formatted string from the application's package's |
2270 | - * default string table, substituting the format arguments as defined in |
2271 | - * {@link java.util.Formatter} and {@link java.lang.String#format}. |
2272 | + * Return a localized formatted string from the application's package's default string table, |
2273 | + * substituting the format arguments as defined in {@link java.util.Formatter} and |
2274 | + * {@link java.lang.String#format}. |
2275 | * |
2276 | * @param resId |
2277 | * Resource id for the format string |
2278 | @@ -606,11 +597,10 @@ |
2279 | } |
2280 | |
2281 | /** |
2282 | - * Return the FragmentManager for interacting with fragments associated with |
2283 | - * this fragment's activity. Note that this will be non-null slightly before |
2284 | - * {@link #getActivity()}, during the time from when the fragment is placed |
2285 | - * in a {@link FragmentTransaction} until it is committed and attached to |
2286 | - * its activity. |
2287 | + * Return the FragmentManager for interacting with fragments associated with this fragment's |
2288 | + * activity. Note that this will be non-null slightly before {@link #getActivity()}, during the |
2289 | + * time from when the fragment is placed in a {@link FragmentTransaction} until it is committed |
2290 | + * and attached to its activity. |
2291 | */ |
2292 | final public FragmentManager getFragmentManager() { |
2293 | return mFragmentManager; |
2294 | @@ -624,46 +614,44 @@ |
2295 | } |
2296 | |
2297 | /** |
2298 | - * Return true if the fragment has been explicitly detached from the UI. |
2299 | - * That is, {@link FragmentTransaction#detach(Fragment) |
2300 | - * FragmentTransaction.detach(Fragment)} has been used on it. |
2301 | + * Return true if the fragment has been explicitly detached from the UI. That is, |
2302 | + * {@link FragmentTransaction#detach(Fragment) FragmentTransaction.detach(Fragment)} has been |
2303 | + * used on it. |
2304 | */ |
2305 | final public boolean isDetached() { |
2306 | return mDetached; |
2307 | } |
2308 | |
2309 | /** |
2310 | - * Return true if this fragment is currently being removed from its |
2311 | - * activity. This is <em>not</em> whether its activity is finishing, but |
2312 | - * rather whether it is in the process of being removed from its activity. |
2313 | + * Return true if this fragment is currently being removed from its activity. This is |
2314 | + * <em>not</em> whether its activity is finishing, but rather whether it is in the process of |
2315 | + * being removed from its activity. |
2316 | */ |
2317 | final public boolean isRemoving() { |
2318 | return mRemoving; |
2319 | } |
2320 | |
2321 | /** |
2322 | - * Return true if the layout is included as part of an activity view |
2323 | - * hierarchy via the <fragment> tag. This will always be true when |
2324 | - * fragments are created through the <fragment> tag, <em>except</em> |
2325 | - * in the case where an old fragment is restored from a previous state and |
2326 | - * it does not appear in the layout of the current state. |
2327 | + * Return true if the layout is included as part of an activity view hierarchy via the |
2328 | + * <fragment> tag. This will always be true when fragments are created through the |
2329 | + * <fragment> tag, <em>except</em> in the case where an old fragment is restored from a |
2330 | + * previous state and it does not appear in the layout of the current state. |
2331 | */ |
2332 | final public boolean isInLayout() { |
2333 | return mInLayout; |
2334 | } |
2335 | |
2336 | /** |
2337 | - * Return true if the fragment is in the resumed state. This is true for the |
2338 | - * duration of {@link #onResume()} and {@link #onPause()} as well. |
2339 | + * Return true if the fragment is in the resumed state. This is true for the duration of |
2340 | + * {@link #onResume()} and {@link #onPause()} as well. |
2341 | */ |
2342 | final public boolean isResumed() { |
2343 | return mResumed; |
2344 | } |
2345 | |
2346 | /** |
2347 | - * Return true if the fragment is currently visible to the user. This means |
2348 | - * it: (1) has been added, (2) has its view attached to the window, and (3) |
2349 | - * is not hidden. |
2350 | + * Return true if the fragment is currently visible to the user. This means it: (1) has been |
2351 | + * added, (2) has its view attached to the window, and (3) is not hidden. |
2352 | */ |
2353 | final public boolean isVisible() { |
2354 | return isAdded() && !mHidden && mView != null && mView.getWindowToken() != null |
2355 | @@ -671,41 +659,36 @@ |
2356 | } |
2357 | |
2358 | /** |
2359 | - * Return true if the fragment has been hidden. By default fragments are |
2360 | - * shown. You can find out about changes to this state with |
2361 | - * {@link #onHiddenChanged}. Note that the hidden state is orthogonal to |
2362 | - * other states -- that is, to be visible to the user, a fragment must be |
2363 | - * both started and not hidden. |
2364 | + * Return true if the fragment has been hidden. By default fragments are shown. You can find out |
2365 | + * about changes to this state with {@link #onHiddenChanged}. Note that the hidden state is |
2366 | + * orthogonal to other states -- that is, to be visible to the user, a fragment must be both |
2367 | + * started and not hidden. |
2368 | */ |
2369 | final public boolean isHidden() { |
2370 | return mHidden; |
2371 | } |
2372 | |
2373 | /** |
2374 | - * Called when the hidden state (as returned by {@link #isHidden()} of the |
2375 | - * fragment has changed. Fragments start out not hidden; this will be called |
2376 | - * whenever the fragment changes state from that. |
2377 | + * Called when the hidden state (as returned by {@link #isHidden()} of the fragment has changed. |
2378 | + * Fragments start out not hidden; this will be called whenever the fragment changes state from |
2379 | + * that. |
2380 | * |
2381 | * @param hidden |
2382 | - * True if the fragment is now hidden, false if it is not |
2383 | - * visible. |
2384 | + * True if the fragment is now hidden, false if it is not visible. |
2385 | */ |
2386 | public void onHiddenChanged(boolean hidden) { |
2387 | } |
2388 | |
2389 | /** |
2390 | - * Control whether a fragment instance is retained across Activity |
2391 | - * re-creation (such as from a configuration change). This can only be used |
2392 | - * with fragments not in the back stack. If set, the fragment lifecycle will |
2393 | - * be slightly different when an activity is recreated: |
2394 | + * Control whether a fragment instance is retained across Activity re-creation (such as from a |
2395 | + * configuration change). This can only be used with fragments not in the back stack. If set, |
2396 | + * the fragment lifecycle will be slightly different when an activity is recreated: |
2397 | * <ul> |
2398 | - * <li> {@link #onDestroy()} will not be called (but {@link #onDetach()} |
2399 | - * still will be, because the fragment is being detached from its current |
2400 | - * activity). |
2401 | - * <li> {@link #onCreate(Bundle)} will not be called since the fragment is |
2402 | - * not being re-created. |
2403 | - * <li> {@link #onAttach(Activity)} and {@link #onActivityCreated(Bundle)} |
2404 | - * <b>will</b> still be called. |
2405 | + * <li> {@link #onDestroy()} will not be called (but {@link #onDetach()} still will be, because |
2406 | + * the fragment is being detached from its current activity). |
2407 | + * <li> {@link #onCreate(Bundle)} will not be called since the fragment is not being re-created. |
2408 | + * <li> {@link #onAttach(Activity)} and {@link #onActivityCreated(Bundle)} <b>will</b> still be |
2409 | + * called. |
2410 | * </ul> |
2411 | */ |
2412 | public void setRetainInstance(boolean retain) { |
2413 | @@ -717,9 +700,8 @@ |
2414 | } |
2415 | |
2416 | /** |
2417 | - * Report that this fragment would like to participate in populating the |
2418 | - * options menu by receiving a call to {@link #onCreateOptionsMenu} and |
2419 | - * related methods. |
2420 | + * Report that this fragment would like to participate in populating the options menu by |
2421 | + * receiving a call to {@link #onCreateOptionsMenu} and related methods. |
2422 | * |
2423 | * @param hasMenu |
2424 | * If true, the fragment has menu items to contribute. |
2425 | @@ -734,14 +716,13 @@ |
2426 | } |
2427 | |
2428 | /** |
2429 | - * Set a hint for whether this fragment's menu should be visible. This is |
2430 | - * useful if you know that a fragment has been placed in your view hierarchy |
2431 | - * so that the user can not currently seen it, so any menu items it has |
2432 | - * should also not be shown. |
2433 | + * Set a hint for whether this fragment's menu should be visible. This is useful if you know |
2434 | + * that a fragment has been placed in your view hierarchy so that the user can not currently |
2435 | + * seen it, so any menu items it has should also not be shown. |
2436 | * |
2437 | * @param menuVisible |
2438 | - * The default is true, meaning the fragment's menu will be shown |
2439 | - * as usual. If false, the user will not see the menu. |
2440 | + * The default is true, meaning the fragment's menu will be shown as usual. If false, |
2441 | + * the user will not see the menu. |
2442 | */ |
2443 | public void setMenuVisibility(boolean menuVisible) { |
2444 | if (mMenuVisible != menuVisible) { |
2445 | @@ -753,20 +734,18 @@ |
2446 | } |
2447 | |
2448 | /** |
2449 | - * Set a hint to the system about whether this fragment's UI is currently |
2450 | - * visible to the user. This hint defaults to true and is persistent across |
2451 | - * fragment instance state save and restore. |
2452 | + * Set a hint to the system about whether this fragment's UI is currently visible to the user. |
2453 | + * This hint defaults to true and is persistent across fragment instance state save and restore. |
2454 | * |
2455 | * <p> |
2456 | - * An app may set this to false to indicate that the fragment's UI is |
2457 | - * scrolled out of visibility or is otherwise not directly visible to the |
2458 | - * user. This may be used by the system to prioritize operations such as |
2459 | - * fragment lifecycle updates or loader ordering behavior. |
2460 | + * An app may set this to false to indicate that the fragment's UI is scrolled out of visibility |
2461 | + * or is otherwise not directly visible to the user. This may be used by the system to |
2462 | + * prioritize operations such as fragment lifecycle updates or loader ordering behavior. |
2463 | * </p> |
2464 | * |
2465 | * @param isVisibleToUser |
2466 | - * true if this fragment's UI is currently visible to the user |
2467 | - * (default), false if it is not. |
2468 | + * true if this fragment's UI is currently visible to the user (default), false if it |
2469 | + * is not. |
2470 | */ |
2471 | public void setUserVisibleHint(boolean isVisibleToUser) { |
2472 | if (!mUserVisibleHint && isVisibleToUser && mState < STARTED) { |
2473 | @@ -800,8 +779,7 @@ |
2474 | } |
2475 | |
2476 | /** |
2477 | - * Call {@link Activity#startActivity(Intent)} on the fragment's containing |
2478 | - * Activity. |
2479 | + * Call {@link Activity#startActivity(Intent)} on the fragment's containing Activity. |
2480 | */ |
2481 | public void startActivity(Intent intent) { |
2482 | if (mActivity == null) { |
2483 | @@ -811,8 +789,8 @@ |
2484 | } |
2485 | |
2486 | /** |
2487 | - * Call {@link Activity#startActivityForResult(Intent, int)} on the |
2488 | - * fragment's containing Activity. |
2489 | + * Call {@link Activity#startActivityForResult(Intent, int)} on the fragment's containing |
2490 | + * Activity. |
2491 | */ |
2492 | public void startActivityForResult(Intent intent, int requestCode) { |
2493 | if (mActivity == null) { |
2494 | @@ -822,79 +800,69 @@ |
2495 | } |
2496 | |
2497 | /** |
2498 | - * Receive the result from a previous call to |
2499 | - * {@link #startActivityForResult(Intent, int)}. This follows the related |
2500 | - * Activity API as described there in |
2501 | + * Receive the result from a previous call to {@link #startActivityForResult(Intent, int)}. This |
2502 | + * follows the related Activity API as described there in |
2503 | * {@link Activity#onActivityResult(int, int, Intent)}. |
2504 | * |
2505 | * @param requestCode |
2506 | - * The integer request code originally supplied to |
2507 | - * startActivityForResult(), allowing you to identify who this |
2508 | - * result came from. |
2509 | + * The integer request code originally supplied to startActivityForResult(), allowing |
2510 | + * you to identify who this result came from. |
2511 | * @param resultCode |
2512 | - * The integer result code returned by the child activity through |
2513 | - * its setResult(). |
2514 | + * The integer result code returned by the child activity through its setResult(). |
2515 | * @param data |
2516 | - * An Intent, which can return result data to the caller (various |
2517 | - * data can be attached to Intent "extras"). |
2518 | + * An Intent, which can return result data to the caller (various data can be |
2519 | + * attached to Intent "extras"). |
2520 | */ |
2521 | public void onActivityResult(int requestCode, int resultCode, Intent data) { |
2522 | } |
2523 | |
2524 | /** |
2525 | - * @hide Hack so that DialogFragment can make its Dialog before creating its |
2526 | - * views, and the view construction can use the dialog's context for |
2527 | - * inflation. Maybe this should become a public API. Note sure. |
2528 | + * @hide Hack so that DialogFragment can make its Dialog before creating its views, and the view |
2529 | + * construction can use the dialog's context for inflation. Maybe this should become a |
2530 | + * public API. Note sure. |
2531 | */ |
2532 | - @SuppressWarnings("unused") |
2533 | public LayoutInflater getLayoutInflater(Bundle savedInstanceState) { |
2534 | return mActivity.getLayoutInflater(); |
2535 | } |
2536 | |
2537 | /** |
2538 | - * Called when a fragment is being created as part of a view layout |
2539 | - * inflation, typically from setting the content view of an activity. This |
2540 | - * may be called immediately after the fragment is created from a <fragment> |
2541 | - * tag in a layout file. Note this is <em>before</em> the fragment's |
2542 | - * {@link #onAttach(Activity)} has been called; all you should do here is |
2543 | - * parse the attributes and save them away. |
2544 | + * Called when a fragment is being created as part of a view layout inflation, typically from |
2545 | + * setting the content view of an activity. This may be called immediately after the fragment is |
2546 | + * created from a <fragment> tag in a layout file. Note this is <em>before</em> the fragment's |
2547 | + * {@link #onAttach(Activity)} has been called; all you should do here is parse the attributes |
2548 | + * and save them away. |
2549 | * |
2550 | * <p> |
2551 | - * This is called every time the fragment is inflated, even if it is being |
2552 | - * inflated into a new instance with saved state. It typically makes sense |
2553 | - * to re-parse the parameters each time, to allow them to change with |
2554 | - * different configurations. |
2555 | + * This is called every time the fragment is inflated, even if it is being inflated into a new |
2556 | + * instance with saved state. It typically makes sense to re-parse the parameters each time, to |
2557 | + * allow them to change with different configurations. |
2558 | * </p> |
2559 | * |
2560 | * <p> |
2561 | - * Here is a typical implementation of a fragment that can take parameters |
2562 | - * both through attributes supplied here as well from |
2563 | - * {@link #getArguments()}: |
2564 | + * Here is a typical implementation of a fragment that can take parameters both through |
2565 | + * attributes supplied here as well from {@link #getArguments()}: |
2566 | * </p> |
2567 | * |
2568 | * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/ |
2569 | * FragmentArguments.java fragment} |
2570 | * |
2571 | * <p> |
2572 | - * Note that parsing the XML attributes uses a "styleable" resource. The |
2573 | - * declaration for the styleable used here is: |
2574 | - * </p> |
2575 | - * |
2576 | - * {@sample development/samples/ApiDemos/res/values/attrs.xml |
2577 | - * fragment_arguments} |
2578 | - * |
2579 | - * <p> |
2580 | - * The fragment can then be declared within its activity's content layout |
2581 | - * through a tag like this: |
2582 | - * </p> |
2583 | - * |
2584 | - * {@sample development/samples/ApiDemos/res/layout/fragment_arguments.xml |
2585 | - * from_attributes} |
2586 | - * |
2587 | - * <p> |
2588 | - * This fragment can also be created dynamically from arguments given at |
2589 | - * runtime in the arguments Bundle; here is an example of doing so at |
2590 | - * creation of the containing activity: |
2591 | + * Note that parsing the XML attributes uses a "styleable" resource. The declaration for the |
2592 | + * styleable used here is: |
2593 | + * </p> |
2594 | + * |
2595 | + * {@sample development/samples/ApiDemos/res/values/attrs.xml fragment_arguments} |
2596 | + * |
2597 | + * <p> |
2598 | + * The fragment can then be declared within its activity's content layout through a tag like |
2599 | + * this: |
2600 | + * </p> |
2601 | + * |
2602 | + * {@sample development/samples/ApiDemos/res/layout/fragment_arguments.xml from_attributes} |
2603 | + * |
2604 | + * <p> |
2605 | + * This fragment can also be created dynamically from arguments given at runtime in the |
2606 | + * arguments Bundle; here is an example of doing so at creation of the containing activity: |
2607 | * </p> |
2608 | * |
2609 | * {@sample development/samples/ApiDemos/src/com/example/android/apis/app/ |
2610 | @@ -905,16 +873,16 @@ |
2611 | * @param attrs |
2612 | * The attributes at the tag where the fragment is being created. |
2613 | * @param savedInstanceState |
2614 | - * If the fragment is being re-created from a previous saved |
2615 | - * state, this is the state. |
2616 | + * If the fragment is being re-created from a previous saved state, this is the |
2617 | + * state. |
2618 | */ |
2619 | public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) { |
2620 | mCalled = true; |
2621 | } |
2622 | |
2623 | /** |
2624 | - * Called when a fragment is first attached to its activity. |
2625 | - * {@link #onCreate(Bundle)} will be called after this. |
2626 | + * Called when a fragment is first attached to its activity. {@link #onCreate(Bundle)} will be |
2627 | + * called after this. |
2628 | */ |
2629 | public void onAttach(@SuppressWarnings("unused") Activity activity) { |
2630 | mCalled = true; |
2631 | @@ -929,46 +897,41 @@ |
2632 | } |
2633 | |
2634 | /** |
2635 | - * Called to do initial creation of a fragment. This is called after |
2636 | - * {@link #onAttach(Activity)} and before |
2637 | - * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}. |
2638 | + * Called to do initial creation of a fragment. This is called after {@link #onAttach(Activity)} |
2639 | + * and before {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}. |
2640 | * |
2641 | * <p> |
2642 | - * Note that this can be called while the fragment's activity is still in |
2643 | - * the process of being created. As such, you can not rely on things like |
2644 | - * the activity's content view hierarchy being initialized at this point. If |
2645 | - * you want to do work once the activity itself is created, see |
2646 | + * Note that this can be called while the fragment's activity is still in the process of being |
2647 | + * created. As such, you can not rely on things like the activity's content view hierarchy being |
2648 | + * initialized at this point. If you want to do work once the activity itself is created, see |
2649 | * {@link #onActivityCreated(Bundle)}. |
2650 | * |
2651 | * @param savedInstanceState |
2652 | - * If the fragment is being re-created from a previous saved |
2653 | - * state, this is the state. |
2654 | + * If the fragment is being re-created from a previous saved state, this is the |
2655 | + * state. |
2656 | */ |
2657 | public void onCreate(Bundle savedInstanceState) { |
2658 | mCalled = true; |
2659 | } |
2660 | |
2661 | /** |
2662 | - * Called to have the fragment instantiate its user interface view. This is |
2663 | - * optional, and non-graphical fragments can return null (which is the |
2664 | - * default implementation). This will be called between |
2665 | - * {@link #onCreate(Bundle)} and {@link #onActivityCreated(Bundle)}. |
2666 | + * Called to have the fragment instantiate its user interface view. This is optional, and |
2667 | + * non-graphical fragments can return null (which is the default implementation). This will be |
2668 | + * called between {@link #onCreate(Bundle)} and {@link #onActivityCreated(Bundle)}. |
2669 | * |
2670 | * <p> |
2671 | - * If you return a View from here, you will later be called in |
2672 | - * {@link #onDestroyView} when the view is being released. |
2673 | + * If you return a View from here, you will later be called in {@link #onDestroyView} when the |
2674 | + * view is being released. |
2675 | * |
2676 | * @param inflater |
2677 | - * The LayoutInflater object that can be used to inflate any |
2678 | - * views in the fragment, |
2679 | + * The LayoutInflater object that can be used to inflate any views in the fragment, |
2680 | * @param container |
2681 | - * If non-null, this is the parent view that the fragment's UI |
2682 | - * should be attached to. The fragment should not add the view |
2683 | - * itself, but this can be used to generate the LayoutParams of |
2684 | - * the view. |
2685 | + * If non-null, this is the parent view that the fragment's UI should be attached to. |
2686 | + * The fragment should not add the view itself, but this can be used to generate the |
2687 | + * LayoutParams of the view. |
2688 | * @param savedInstanceState |
2689 | - * If non-null, this fragment is being re-constructed from a |
2690 | - * previous saved state as given here. |
2691 | + * If non-null, this fragment is being re-constructed from a previous saved state as |
2692 | + * given here. |
2693 | * |
2694 | * @return Return the View for the fragment's UI, or null. |
2695 | */ |
2696 | @@ -978,26 +941,23 @@ |
2697 | } |
2698 | |
2699 | /** |
2700 | - * Called immediately after |
2701 | - * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)} has returned, |
2702 | - * but before any saved state has been restored in to the view. This gives |
2703 | - * subclasses a chance to initialize themselves once they know their view |
2704 | - * hierarchy has been completely created. The fragment's view hierarchy is |
2705 | - * not however attached to its parent at this point. |
2706 | + * Called immediately after {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)} has |
2707 | + * returned, but before any saved state has been restored in to the view. This gives subclasses |
2708 | + * a chance to initialize themselves once they know their view hierarchy has been completely |
2709 | + * created. The fragment's view hierarchy is not however attached to its parent at this point. |
2710 | * |
2711 | * @param view |
2712 | - * The View returned by |
2713 | - * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}. |
2714 | + * The View returned by {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}. |
2715 | * @param savedInstanceState |
2716 | - * If non-null, this fragment is being re-constructed from a |
2717 | - * previous saved state as given here. |
2718 | + * If non-null, this fragment is being re-constructed from a previous saved state as |
2719 | + * given here. |
2720 | */ |
2721 | public void onViewCreated(View view, Bundle savedInstanceState) { |
2722 | } |
2723 | |
2724 | /** |
2725 | - * Get the root view for the fragment's layout (the one returned by |
2726 | - * {@link #onCreateView}), if provided. |
2727 | + * Get the root view for the fragment's layout (the one returned by {@link #onCreateView}), if |
2728 | + * provided. |
2729 | * |
2730 | * @return The fragment's root view, or null if it has no layout. |
2731 | */ |
2732 | @@ -1006,27 +966,24 @@ |
2733 | } |
2734 | |
2735 | /** |
2736 | - * Called when the fragment's activity has been created and this fragment's |
2737 | - * view hierarchy instantiated. It can be used to do final initialization |
2738 | - * once these pieces are in place, such as retrieving views or restoring |
2739 | - * state. It is also useful for fragments that use |
2740 | - * {@link #setRetainInstance(boolean)} to retain their instance, as this |
2741 | - * callback tells the fragment when it is fully associated with the new |
2742 | - * activity instance. This is called after {@link #onCreateView} and before |
2743 | - * {@link #onStart()}. |
2744 | + * Called when the fragment's activity has been created and this fragment's view hierarchy |
2745 | + * instantiated. It can be used to do final initialization once these pieces are in place, such |
2746 | + * as retrieving views or restoring state. It is also useful for fragments that use |
2747 | + * {@link #setRetainInstance(boolean)} to retain their instance, as this callback tells the |
2748 | + * fragment when it is fully associated with the new activity instance. This is called after |
2749 | + * {@link #onCreateView} and before {@link #onStart()}. |
2750 | * |
2751 | * @param savedInstanceState |
2752 | - * If the fragment is being re-created from a previous saved |
2753 | - * state, this is the state. |
2754 | + * If the fragment is being re-created from a previous saved state, this is the |
2755 | + * state. |
2756 | */ |
2757 | public void onActivityCreated(Bundle savedInstanceState) { |
2758 | mCalled = true; |
2759 | } |
2760 | |
2761 | /** |
2762 | - * Called when the Fragment is visible to the user. This is generally tied |
2763 | - * to {@link Activity#onStart() Activity.onStart} of the containing |
2764 | - * Activity's lifecycle. |
2765 | + * Called when the Fragment is visible to the user. This is generally tied to |
2766 | + * {@link Activity#onStart() Activity.onStart} of the containing Activity's lifecycle. |
2767 | */ |
2768 | public void onStart() { |
2769 | mCalled = true; |
2770 | @@ -1044,31 +1001,28 @@ |
2771 | } |
2772 | |
2773 | /** |
2774 | - * Called when the fragment is visible to the user and actively running. |
2775 | - * This is generally tied to {@link Activity#onResume() Activity.onResume} |
2776 | - * of the containing Activity's lifecycle. |
2777 | + * Called when the fragment is visible to the user and actively running. This is generally tied |
2778 | + * to {@link Activity#onResume() Activity.onResume} of the containing Activity's lifecycle. |
2779 | */ |
2780 | public void onResume() { |
2781 | mCalled = true; |
2782 | } |
2783 | |
2784 | /** |
2785 | - * Called to ask the fragment to save its current dynamic state, so it can |
2786 | - * later be reconstructed in a new instance of its process is restarted. If |
2787 | - * a new instance of the fragment later needs to be created, the data you |
2788 | - * place in the Bundle here will be available in the Bundle given to |
2789 | - * {@link #onCreate(Bundle)}, |
2790 | + * Called to ask the fragment to save its current dynamic state, so it can later be |
2791 | + * reconstructed in a new instance of its process is restarted. If a new instance of the |
2792 | + * fragment later needs to be created, the data you place in the Bundle here will be available |
2793 | + * in the Bundle given to {@link #onCreate(Bundle)}, |
2794 | * {@link #onCreateView(LayoutInflater, ViewGroup, Bundle)}, and |
2795 | * {@link #onActivityCreated(Bundle)}. |
2796 | * |
2797 | * <p> |
2798 | * This corresponds to {@link Activity#onSaveInstanceState(Bundle) |
2799 | - * Activity.onSaveInstanceState(Bundle)} and most of the discussion there |
2800 | - * applies here as well. Note however: <em>this method may be called |
2801 | - * at any time before {@link #onDestroy()}</em>. There are many situations |
2802 | - * where a fragment may be mostly torn down (such as when placed on the back |
2803 | - * stack with no UI showing), but its state will not be saved until its |
2804 | - * owning activity actually needs to save its state. |
2805 | + * Activity.onSaveInstanceState(Bundle)} and most of the discussion there applies here as well. |
2806 | + * Note however: <em>this method may be called |
2807 | + * at any time before {@link #onDestroy()}</em>. There are many situations where a fragment may |
2808 | + * be mostly torn down (such as when placed on the back stack with no UI showing), but its state |
2809 | + * will not be saved until its owning activity actually needs to save its state. |
2810 | * |
2811 | * @param outState |
2812 | * Bundle in which to place your saved state. |
2813 | @@ -1082,8 +1036,7 @@ |
2814 | |
2815 | /** |
2816 | * Called when the Fragment is no longer resumed. This is generally tied to |
2817 | - * {@link Activity#onPause() Activity.onPause} of the containing Activity's |
2818 | - * lifecycle. |
2819 | + * {@link Activity#onPause() Activity.onPause} of the containing Activity's lifecycle. |
2820 | */ |
2821 | public void onPause() { |
2822 | mCalled = true; |
2823 | @@ -1091,8 +1044,7 @@ |
2824 | |
2825 | /** |
2826 | * Called when the Fragment is no longer started. This is generally tied to |
2827 | - * {@link Activity#onStop() Activity.onStop} of the containing Activity's |
2828 | - * lifecycle. |
2829 | + * {@link Activity#onStop() Activity.onStop} of the containing Activity's lifecycle. |
2830 | */ |
2831 | public void onStop() { |
2832 | mCalled = true; |
2833 | @@ -1103,21 +1055,20 @@ |
2834 | } |
2835 | |
2836 | /** |
2837 | - * Called when the view previously created by {@link #onCreateView} has been |
2838 | - * detached from the fragment. The next time the fragment needs to be |
2839 | - * displayed, a new view will be created. This is called after |
2840 | - * {@link #onStop()} and before {@link #onDestroy()}. It is called |
2841 | - * <em>regardless</em> of whether {@link #onCreateView} returned a non-null |
2842 | - * view. Internally it is called after the view's state has been saved but |
2843 | - * before it has been removed from its parent. |
2844 | + * Called when the view previously created by {@link #onCreateView} has been detached from the |
2845 | + * fragment. The next time the fragment needs to be displayed, a new view will be created. This |
2846 | + * is called after {@link #onStop()} and before {@link #onDestroy()}. It is called |
2847 | + * <em>regardless</em> of whether {@link #onCreateView} returned a non-null view. Internally it |
2848 | + * is called after the view's state has been saved but before it has been removed from its |
2849 | + * parent. |
2850 | */ |
2851 | public void onDestroyView() { |
2852 | mCalled = true; |
2853 | } |
2854 | |
2855 | /** |
2856 | - * Called when the fragment is no longer in use. This is called after |
2857 | - * {@link #onStop()} and before {@link #onDetach()}. |
2858 | + * Called when the fragment is no longer in use. This is called after {@link #onStop()} and |
2859 | + * before {@link #onDetach()}. |
2860 | */ |
2861 | public void onDestroy() { |
2862 | mCalled = true; |
2863 | @@ -1134,10 +1085,9 @@ |
2864 | } |
2865 | |
2866 | /** |
2867 | - * Called by the fragment manager once this fragment has been removed, so |
2868 | - * that we don't have any left-over state if the application decides to |
2869 | - * re-use the instance. This only clears state that the framework internally |
2870 | - * manages, not things the application sets. |
2871 | + * Called by the fragment manager once this fragment has been removed, so that we don't have any |
2872 | + * left-over state if the application decides to re-use the instance. This only clears state |
2873 | + * that the framework internally manages, not things the application sets. |
2874 | */ |
2875 | void initState() { |
2876 | mIndex = -1; |
2877 | @@ -1163,42 +1113,38 @@ |
2878 | } |
2879 | |
2880 | /** |
2881 | - * Called when the fragment is no longer attached to its activity. This is |
2882 | - * called after {@link #onDestroy()}. |
2883 | + * Called when the fragment is no longer attached to its activity. This is called after |
2884 | + * {@link #onDestroy()}. |
2885 | */ |
2886 | public void onDetach() { |
2887 | mCalled = true; |
2888 | } |
2889 | |
2890 | /** |
2891 | - * Initialize the contents of the Activity's standard options menu. You |
2892 | - * should place your menu items in to <var>menu</var>. For this method to be |
2893 | - * called, you must have first called {@link #setHasOptionsMenu}. See |
2894 | - * {@link Activity#onCreateOptionsMenu(Menu) Activity.onCreateOptionsMenu} |
2895 | - * for more information. |
2896 | + * Initialize the contents of the Activity's standard options menu. You should place your menu |
2897 | + * items in to <var>menu</var>. For this method to be called, you must have first called |
2898 | + * {@link #setHasOptionsMenu}. See {@link Activity#onCreateOptionsMenu(Menu) |
2899 | + * Activity.onCreateOptionsMenu} for more information. |
2900 | * |
2901 | * @param menu |
2902 | * The options menu in which you place your items. |
2903 | - * |
2904 | + * @param inflater |
2905 | * @see #setHasOptionsMenu |
2906 | * @see #onPrepareOptionsMenu |
2907 | * @see #onOptionsItemSelected |
2908 | */ |
2909 | - @SuppressWarnings("unused") |
2910 | public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { |
2911 | } |
2912 | |
2913 | /** |
2914 | - * Prepare the Screen's standard options menu to be displayed. This is |
2915 | - * called right before the menu is shown, every time it is shown. You can |
2916 | - * use this method to efficiently enable/disable items or otherwise |
2917 | - * dynamically modify the contents. See |
2918 | - * {@link Activity#onPrepareOptionsMenu(Menu) Activity.onPrepareOptionsMenu} |
2919 | - * for more information. |
2920 | + * Prepare the Screen's standard options menu to be displayed. This is called right before the |
2921 | + * menu is shown, every time it is shown. You can use this method to efficiently enable/disable |
2922 | + * items or otherwise dynamically modify the contents. See |
2923 | + * {@link Activity#onPrepareOptionsMenu(Menu) Activity.onPrepareOptionsMenu} for more |
2924 | + * information. |
2925 | * |
2926 | * @param menu |
2927 | - * The options menu as last shown or first initialized by |
2928 | - * onCreateOptionsMenu(). |
2929 | + * The options menu as last shown or first initialized by onCreateOptionsMenu(). |
2930 | * |
2931 | * @see #setHasOptionsMenu |
2932 | * @see #onCreateOptionsMenu |
2933 | @@ -1207,31 +1153,29 @@ |
2934 | } |
2935 | |
2936 | /** |
2937 | - * Called when this fragment's option menu items are no longer being |
2938 | - * included in the overall options menu. Receiving this call means that the |
2939 | - * menu needed to be rebuilt, but this fragment's items were not included in |
2940 | - * the newly built menu (its |
2941 | + * Called when this fragment's option menu items are no longer being included in the overall |
2942 | + * options menu. Receiving this call means that the menu needed to be rebuilt, but this |
2943 | + * fragment's items were not included in the newly built menu (its |
2944 | * {@link #onCreateOptionsMenu(Menu, MenuInflater)} was not called). |
2945 | */ |
2946 | public void onDestroyOptionsMenu() { |
2947 | } |
2948 | |
2949 | /** |
2950 | - * This hook is called whenever an item in your options menu is selected. |
2951 | - * The default implementation simply returns false to have the normal |
2952 | - * processing happen (calling the item's Runnable or sending a message to |
2953 | - * its Handler as appropriate). You can use this method for any items for |
2954 | - * which you would like to do processing without those other facilities. |
2955 | + * This hook is called whenever an item in your options menu is selected. The default |
2956 | + * implementation simply returns false to have the normal processing happen (calling the item's |
2957 | + * Runnable or sending a message to its Handler as appropriate). You can use this method for any |
2958 | + * items for which you would like to do processing without those other facilities. |
2959 | * |
2960 | * <p> |
2961 | - * Derived classes should call through to the base class for it to perform |
2962 | - * the default menu handling. |
2963 | + * Derived classes should call through to the base class for it to perform the default menu |
2964 | + * handling. |
2965 | * |
2966 | * @param item |
2967 | * The menu item that was selected. |
2968 | * |
2969 | - * @return boolean Return false to allow normal menu processing to proceed, |
2970 | - * true to consume it here. |
2971 | + * @return boolean Return false to allow normal menu processing to proceed, true to consume it |
2972 | + * here. |
2973 | * |
2974 | * @see #onCreateOptionsMenu |
2975 | */ |
2976 | @@ -1241,44 +1185,39 @@ |
2977 | } |
2978 | |
2979 | /** |
2980 | - * This hook is called whenever the options menu is being closed (either by |
2981 | - * the user canceling the menu with the back/menu button, or when an item is |
2982 | - * selected). |
2983 | + * This hook is called whenever the options menu is being closed (either by the user canceling |
2984 | + * the menu with the back/menu button, or when an item is selected). |
2985 | * |
2986 | * @param menu |
2987 | - * The options menu as last shown or first initialized by |
2988 | - * onCreateOptionsMenu(). |
2989 | + * The options menu as last shown or first initialized by onCreateOptionsMenu(). |
2990 | */ |
2991 | public void onOptionsMenuClosed(Menu menu) { |
2992 | } |
2993 | |
2994 | /** |
2995 | - * Called when a context menu for the {@code view} is about to be shown. |
2996 | - * Unlike {@link #onCreateOptionsMenu}, this will be called every time the |
2997 | - * context menu is about to be shown and should be populated for the view |
2998 | - * (or item inside the view for {@link AdapterView} subclasses, this can be |
2999 | - * found in the {@code menuInfo})). |
3000 | - * <p> |
3001 | - * Use {@link #onContextItemSelected(android.view.MenuItem)} to know when an |
3002 | - * item has been selected. |
3003 | - * <p> |
3004 | - * The default implementation calls up to |
3005 | - * {@link Activity#onCreateContextMenu Activity.onCreateContextMenu}, though |
3006 | - * you can not call this implementation if you don't want that behavior. |
3007 | - * <p> |
3008 | - * It is not safe to hold onto the context menu after this method returns. |
3009 | - * {@inheritDoc} |
3010 | + * Called when a context menu for the {@code view} is about to be shown. Unlike |
3011 | + * {@link #onCreateOptionsMenu}, this will be called every time the context menu is about to be |
3012 | + * shown and should be populated for the view (or item inside the view for {@link AdapterView} |
3013 | + * subclasses, this can be found in the {@code menuInfo})). |
3014 | + * <p> |
3015 | + * Use {@link #onContextItemSelected(android.view.MenuItem)} to know when an item has been |
3016 | + * selected. |
3017 | + * <p> |
3018 | + * The default implementation calls up to {@link Activity#onCreateContextMenu |
3019 | + * Activity.onCreateContextMenu}, though you can not call this implementation if you don't want |
3020 | + * that behavior. |
3021 | + * <p> |
3022 | + * It is not safe to hold onto the context menu after this method returns. {@inheritDoc} |
3023 | */ |
3024 | public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) { |
3025 | this.mActivity.onCreateContextMenu(menu, v, menuInfo); |
3026 | } |
3027 | |
3028 | /** |
3029 | - * Registers a context menu to be shown for the given view (multiple views |
3030 | - * can show the context menu). This method will set the |
3031 | - * {@link OnCreateContextMenuListener} on the view to this fragment, so |
3032 | - * {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be |
3033 | - * called when it is time to show the context menu. |
3034 | + * Registers a context menu to be shown for the given view (multiple views can show the context |
3035 | + * menu). This method will set the {@link OnCreateContextMenuListener} on the view to this |
3036 | + * fragment, so {@link #onCreateContextMenu(ContextMenu, View, ContextMenuInfo)} will be called |
3037 | + * when it is time to show the context menu. |
3038 | * |
3039 | * @see #unregisterForContextMenu(View) |
3040 | * @param view |
3041 | @@ -1289,8 +1228,8 @@ |
3042 | } |
3043 | |
3044 | /** |
3045 | - * Prevents a context menu to be shown for the given view. This method will |
3046 | - * remove the {@link OnCreateContextMenuListener} on the view. |
3047 | + * Prevents a context menu to be shown for the given view. This method will remove the |
3048 | + * {@link OnCreateContextMenuListener} on the view. |
3049 | * |
3050 | * @see #registerForContextMenu(View) |
3051 | * @param view |
3052 | @@ -1302,22 +1241,21 @@ |
3053 | } |
3054 | |
3055 | /** |
3056 | - * This hook is called whenever an item in a context menu is selected. The |
3057 | - * default implementation simply returns false to have the normal processing |
3058 | - * happen (calling the item's Runnable or sending a message to its Handler |
3059 | - * as appropriate). You can use this method for any items for which you |
3060 | - * would like to do processing without those other facilities. |
3061 | - * <p> |
3062 | - * Use {@link MenuItem#getMenuInfo()} to get extra information set by the |
3063 | - * View that added this menu item. |
3064 | - * <p> |
3065 | - * Derived classes should call through to the base class for it to perform |
3066 | - * the default menu handling. |
3067 | + * This hook is called whenever an item in a context menu is selected. The default |
3068 | + * implementation simply returns false to have the normal processing happen (calling the item's |
3069 | + * Runnable or sending a message to its Handler as appropriate). You can use this method for any |
3070 | + * items for which you would like to do processing without those other facilities. |
3071 | + * <p> |
3072 | + * Use {@link MenuItem#getMenuInfo()} to get extra information set by the View that added this |
3073 | + * menu item. |
3074 | + * <p> |
3075 | + * Derived classes should call through to the base class for it to perform the default menu |
3076 | + * handling. |
3077 | * |
3078 | * @param item |
3079 | * The context menu item that was selected. |
3080 | - * @return boolean Return false to allow normal context menu processing to |
3081 | - * proceed, true to consume it here. |
3082 | + * @return boolean Return false to allow normal context menu processing to proceed, true to |
3083 | + * consume it here. |
3084 | */ |
3085 | @SuppressWarnings("static-method") |
3086 | public boolean onContextItemSelected(MenuItem item) { |
3087 | @@ -1332,8 +1270,8 @@ |
3088 | * @param fd |
3089 | * The raw file descriptor that the dump is being sent to. |
3090 | * @param writer |
3091 | - * The PrintWriter to which you should dump your state. This will |
3092 | - * be closed for you after you return. |
3093 | + * The PrintWriter to which you should dump your state. This will be closed for you |
3094 | + * after you return. |
3095 | * @param args |
3096 | * additional arguments to the dump request. |
3097 | */ |
3098 | |
3099 | === modified file 'NarauCupcake/src/android/support/v4/app/FragmentActivity.java' |
3100 | --- NarauCupcake/src/android/support/v4/app/FragmentActivity.java 2012-12-16 19:16:57 +0000 |
3101 | +++ NarauCupcake/src/android/support/v4/app/FragmentActivity.java 2012-12-18 18:47:22 +0000 |
3102 | @@ -75,6 +75,7 @@ |
3103 | * </p> |
3104 | * </ul> |
3105 | */ |
3106 | +@SuppressWarnings("unqualified-field-access") |
3107 | public abstract class FragmentActivity extends Activity { |
3108 | private static final String TAG = "FragmentActivity"; |
3109 | |
3110 | |
3111 | === modified file 'NarauCupcake/src/android/support/v4/app/FragmentManager.java' |
3112 | --- NarauCupcake/src/android/support/v4/app/FragmentManager.java 2012-12-15 23:46:16 +0000 |
3113 | +++ NarauCupcake/src/android/support/v4/app/FragmentManager.java 2012-12-18 18:47:22 +0000 |
3114 | @@ -59,6 +59,7 @@ |
3115 | * <p> |
3116 | * Your activity must derive from {@link FragmentActivity} to use this. |
3117 | */ |
3118 | +@SuppressWarnings("unqualified-field-access") |
3119 | public abstract class FragmentManager { |
3120 | /** |
3121 | * Representation of an entry on the fragment back stack, as created with |
3122 | @@ -360,6 +361,7 @@ |
3123 | } |
3124 | } |
3125 | |
3126 | +@SuppressWarnings("unqualified-field-access") |
3127 | final class FragmentManagerState implements Parcelable { |
3128 | FragmentState[] mActive; |
3129 | int[] mAdded; |
3130 | @@ -398,6 +400,7 @@ |
3131 | /** |
3132 | * Container for fragments associated with an activity. |
3133 | */ |
3134 | +@SuppressWarnings("unqualified-field-access") |
3135 | final class FragmentManagerImpl extends FragmentManager { |
3136 | static boolean DEBUG = false; |
3137 | static final String TAG = "FragmentManager"; |
3138 | |
3139 | === modified file 'NarauCupcake/src/android/support/v4/app/ListFragment.java' |
3140 | --- NarauCupcake/src/android/support/v4/app/ListFragment.java 2012-12-15 23:46:16 +0000 |
3141 | +++ NarauCupcake/src/android/support/v4/app/ListFragment.java 2012-12-18 18:47:22 +0000 |
3142 | @@ -39,6 +39,7 @@ |
3143 | * to switch to the framework's implementation. See the framework SDK |
3144 | * documentation for a class overview. |
3145 | */ |
3146 | +@SuppressWarnings("unqualified-field-access") |
3147 | public class ListFragment extends Fragment { |
3148 | static final int INTERNAL_EMPTY_ID = 0x00ff0001; |
3149 | static final int INTERNAL_PROGRESS_CONTAINER_ID = 0x00ff0002; |
3150 | |
3151 | === modified file 'NarauCupcake/src/android/support/v4/app/LoaderManager.java' |
3152 | --- NarauCupcake/src/android/support/v4/app/LoaderManager.java 2012-11-21 00:38:43 +0000 |
3153 | +++ NarauCupcake/src/android/support/v4/app/LoaderManager.java 2012-12-18 18:47:22 +0000 |
3154 | @@ -207,6 +207,7 @@ |
3155 | } |
3156 | } |
3157 | |
3158 | +@SuppressWarnings("unqualified-field-access") |
3159 | class LoaderManagerImpl extends LoaderManager { |
3160 | static final String TAG = "LoaderManager"; |
3161 | static boolean DEBUG = false; |
3162 | |
3163 | === modified file 'NarauCupcake/src/android/support/v4/app/NotificationCompat.java' |
3164 | --- NarauCupcake/src/android/support/v4/app/NotificationCompat.java 2012-11-21 00:38:43 +0000 |
3165 | +++ NarauCupcake/src/android/support/v4/app/NotificationCompat.java 2012-12-18 18:47:22 +0000 |
3166 | @@ -107,6 +107,7 @@ |
3167 | * Builder class for {@link Notification} objects. Allows easier control over |
3168 | * all the flags, as well as help constructing the typical notification layouts. |
3169 | */ |
3170 | + @SuppressWarnings("unqualified-field-access") |
3171 | public static class Builder { |
3172 | Context mContext; |
3173 | |
3174 | @@ -503,6 +504,7 @@ |
3175 | * An object that can apply a rich notification style to a {@link Notification.Builder} |
3176 | * object. |
3177 | */ |
3178 | + @SuppressWarnings("unqualified-field-access") |
3179 | public static abstract class Style |
3180 | { |
3181 | Builder mBuilder; |
3182 | @@ -545,6 +547,7 @@ |
3183 | * |
3184 | * @see Notification#bigContentView |
3185 | */ |
3186 | + @SuppressWarnings("unqualified-field-access") |
3187 | public static class BigPictureStyle extends Style { |
3188 | Bitmap mPicture; |
3189 | |
3190 | @@ -599,6 +602,7 @@ |
3191 | * |
3192 | * @see Notification#bigContentView |
3193 | */ |
3194 | + @SuppressWarnings("unqualified-field-access") |
3195 | public static class BigTextStyle extends Style { |
3196 | CharSequence mBigText; |
3197 | |
3198 | @@ -657,6 +661,7 @@ |
3199 | * |
3200 | * @see Notification#bigContentView |
3201 | */ |
3202 | + @SuppressWarnings("unqualified-field-access") |
3203 | public static class InboxStyle extends Style { |
3204 | ArrayList<CharSequence> mTexts = new ArrayList<CharSequence>(); |
3205 | |
3206 | |
3207 | === modified file 'NarauCupcake/src/android/support/v4/app/TaskStackBuilder.java' |
3208 | --- NarauCupcake/src/android/support/v4/app/TaskStackBuilder.java 2012-11-21 00:38:43 +0000 |
3209 | +++ NarauCupcake/src/android/support/v4/app/TaskStackBuilder.java 2012-12-18 18:47:22 +0000 |
3210 | @@ -74,6 +74,7 @@ |
3211 | * from the developer guide and <a href="{@docRoot} |
3212 | * design/patterns/navigation.html">Navigation</a> from the design guide. </div> |
3213 | */ |
3214 | +@SuppressWarnings("unqualified-field-access") |
3215 | public class TaskStackBuilder implements Iterable<Intent> { |
3216 | private static final String TAG = "TaskStackBuilder"; |
3217 | |
3218 | |
3219 | === modified file 'NarauCupcake/src/android/support/v4/content/Loader.java' |
3220 | --- NarauCupcake/src/android/support/v4/content/Loader.java 2012-10-19 17:32:25 +0000 |
3221 | +++ NarauCupcake/src/android/support/v4/content/Loader.java 2012-12-18 18:47:22 +0000 |
3222 | @@ -31,6 +31,7 @@ |
3223 | * to switch to the framework's implementation. See the framework SDK |
3224 | * documentation for a class overview. |
3225 | */ |
3226 | +@SuppressWarnings("unqualified-field-access") |
3227 | public class Loader<D> { |
3228 | int mId; |
3229 | OnLoadCompleteListener<D> mListener; |
3230 | |
3231 | === modified file 'NarauCupcake/src/android/support/v4/util/LogWriter.java' |
3232 | --- NarauCupcake/src/android/support/v4/util/LogWriter.java 2012-10-19 17:32:25 +0000 |
3233 | +++ NarauCupcake/src/android/support/v4/util/LogWriter.java 2012-12-18 18:47:22 +0000 |
3234 | @@ -26,6 +26,7 @@ |
3235 | * |
3236 | * @hide |
3237 | */ |
3238 | +@SuppressWarnings("unqualified-field-access") |
3239 | public class LogWriter extends Writer { |
3240 | private final String mTag; |
3241 | private StringBuilder mBuilder = new StringBuilder(128); |
3242 | |
3243 | === modified file 'NarauCupcake/src/android/support/v4/util/SparseArrayCompat.java' |
3244 | --- NarauCupcake/src/android/support/v4/util/SparseArrayCompat.java 2012-12-15 23:46:16 +0000 |
3245 | +++ NarauCupcake/src/android/support/v4/util/SparseArrayCompat.java 2012-12-18 18:47:22 +0000 |
3246 | @@ -22,6 +22,7 @@ |
3247 | * A copy of Honeycomb's {@link android.util.SparseArray}, that provides a |
3248 | * removeAt() method. |
3249 | */ |
3250 | +@SuppressWarnings("unqualified-field-access") |
3251 | public class SparseArrayCompat<E> { |
3252 | private static final Object DELETED = new Object(); |
3253 | private boolean mGarbage = false; |
3254 | |
3255 | === modified file 'NarauCupcake/src/org/vono/narau/Narau.java' |
3256 | --- NarauCupcake/src/org/vono/narau/Narau.java 2012-12-16 19:16:57 +0000 |
3257 | +++ NarauCupcake/src/org/vono/narau/Narau.java 2012-12-18 18:47:22 +0000 |
3258 | @@ -253,9 +253,8 @@ |
3259 | Menu menu = MenuCompat.onKeyUp(this, keyCode, R.menu.main); |
3260 | if (null != menu) { |
3261 | return true; |
3262 | - } else { |
3263 | - return super.onKeyUp(keyCode, event); |
3264 | } |
3265 | + return super.onKeyUp(keyCode, event); |
3266 | } |
3267 | |
3268 | @Override |
3269 | @@ -341,7 +340,7 @@ |
3270 | final TextView tvSummary = (TextView) cView.findViewById(android.R.id.summary); |
3271 | final ImageView ivIcon = (ImageView) cView.findViewById(android.R.id.icon); |
3272 | |
3273 | - final MenuActivity item = listActivities.get(position); |
3274 | + final MenuActivity item = this.listActivities.get(position); |
3275 | tvTitle.setText(item.name); |
3276 | ivIcon.setImageDrawable(item.icon); |
3277 | tvSummary.setText(item.description); |
3278 | |
3279 | === modified file 'NarauCupcake/src/org/vono/narau/QuitThread.java' |
3280 | --- NarauCupcake/src/org/vono/narau/QuitThread.java 2012-12-15 23:46:16 +0000 |
3281 | +++ NarauCupcake/src/org/vono/narau/QuitThread.java 2012-12-18 18:47:22 +0000 |
3282 | @@ -88,12 +88,12 @@ |
3283 | |
3284 | synchronized (this) { |
3285 | try { |
3286 | - this.wait(exitTime); |
3287 | + this.wait(this.exitTime); |
3288 | } catch (InterruptedException ie) { |
3289 | } |
3290 | |
3291 | if (this.haveToExit) { |
3292 | - Log.i(TAG, "Stop application after " + (exitTime / 1000) + "s of inactivity"); |
3293 | + Log.i(TAG, "Stop application after " + (this.exitTime / 1000) + "s of inactivity"); |
3294 | System.exit(0); |
3295 | } |
3296 | } |
3297 | |
3298 | === modified file 'NarauCupcake/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java' |
3299 | --- NarauCupcake/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java 2012-12-15 23:46:16 +0000 |
3300 | +++ NarauCupcake/src/org/vono/narau/common/dictionary/EntryArrayAdapter.java 2012-12-18 18:47:22 +0000 |
3301 | @@ -95,7 +95,8 @@ |
3302 | tvReading.setMovementMethod(LinkMovementMethod.getInstance()); |
3303 | |
3304 | tvSense.setText(Html.fromHtml(entry.getHTMLSenses())); |
3305 | - LayoutParams lp = new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT, 1.0f); |
3306 | + LayoutParams lp = new LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
3307 | + ViewGroup.LayoutParams.WRAP_CONTENT, 1.0f); |
3308 | tvSense.setLayoutParams(lp); |
3309 | tvSense.setMovementMethod(LinkMovementMethod.getInstance()); |
3310 | // Try to put the tvSense displayed |
3311 | |
3312 | === modified file 'NarauCupcake/src/org/vono/narau/common/dictionary/EntryListFragment.java' |
3313 | --- NarauCupcake/src/org/vono/narau/common/dictionary/EntryListFragment.java 2012-12-15 23:46:16 +0000 |
3314 | +++ NarauCupcake/src/org/vono/narau/common/dictionary/EntryListFragment.java 2012-12-18 18:47:22 +0000 |
3315 | @@ -70,7 +70,7 @@ |
3316 | View v = super.onCreateView(inflater, container, savedInstanceState); |
3317 | |
3318 | if (0 != this.headerLayoutId) { |
3319 | - View header = super.getLayoutInflater(savedInstanceState).inflate(headerLayoutId, null); |
3320 | + View header = super.getLayoutInflater(savedInstanceState).inflate(this.headerLayoutId, null); |
3321 | |
3322 | // http://stackoverflow.com/a/4401369 |
3323 | LayoutParams lp = new ListView.LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); |
3324 | |
3325 | === modified file 'NarauCupcake/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java' |
3326 | --- NarauCupcake/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java 2012-12-16 19:16:57 +0000 |
3327 | +++ NarauCupcake/src/org/vono/narau/common/kanji/KanjiListSelectActivity.java 2012-12-18 18:47:22 +0000 |
3328 | @@ -115,7 +115,7 @@ |
3329 | // inflater.inflate(R.menu.kanji_list_select, menu); |
3330 | // return true; |
3331 | // } |
3332 | - |
3333 | + |
3334 | @Override |
3335 | protected void onStop() { |
3336 | MenuCompat.closeMenu(R.menu.kanji_list_select); |
3337 | @@ -127,9 +127,8 @@ |
3338 | Menu menu = MenuCompat.onKeyUp(this, keyCode, R.menu.kanji_list_select); |
3339 | if (null != menu) { |
3340 | return true; |
3341 | - } else { |
3342 | - return super.onKeyUp(keyCode, event); |
3343 | } |
3344 | + return super.onKeyUp(keyCode, event); |
3345 | } |
3346 | |
3347 | @Override |
3348 | @@ -390,6 +389,11 @@ |
3349 | dest.writeByte((byte) (this.noMatch ? 1 : 0)); |
3350 | } |
3351 | |
3352 | + @Override |
3353 | + public int hashCode() { |
3354 | + return this.codepoint; |
3355 | + } |
3356 | + |
3357 | public static final Parcelable.Creator<Radical> CREATOR = new Parcelable.Creator<Radical>() { |
3358 | public Radical createFromParcel(Parcel in) { |
3359 | return new Radical(in); |
3360 | @@ -461,16 +465,16 @@ |
3361 | |
3362 | @Override |
3363 | public void handleMessage(Message msg) { |
3364 | - if (LOAD_DONE == msg.what && null != activity) { |
3365 | - if (null != activity.progressDialog) { |
3366 | - activity.progressDialog.dismiss(); |
3367 | - activity.progressDialog = null; |
3368 | + if (LOAD_DONE == msg.what && null != this.activity) { |
3369 | + if (null != this.activity.progressDialog) { |
3370 | + this.activity.progressDialog.dismiss(); |
3371 | + this.activity.progressDialog = null; |
3372 | } |
3373 | - activity.kanjiList = KanjiListSelectActivity.thread.tKanjiList; |
3374 | - activity.radicalsList = KanjiListSelectActivity.thread.tRadicalsList; |
3375 | + this.activity.kanjiList = KanjiListSelectActivity.thread.tKanjiList; |
3376 | + this.activity.radicalsList = KanjiListSelectActivity.thread.tRadicalsList; |
3377 | |
3378 | - activity.initUI(); |
3379 | - activity.updateKanjiList(); |
3380 | + this.activity.initUI(); |
3381 | + this.activity.updateKanjiList(); |
3382 | |
3383 | KanjiListSelectActivity.thread = null; |
3384 | KanjiListSelectActivity.handler = null; |
3385 | |
3386 | === modified file 'NarauCupcake/src/org/vono/narau/common/kanji/KanjiView.java' |
3387 | --- NarauCupcake/src/org/vono/narau/common/kanji/KanjiView.java 2012-12-15 23:46:16 +0000 |
3388 | +++ NarauCupcake/src/org/vono/narau/common/kanji/KanjiView.java 2012-12-18 18:47:22 +0000 |
3389 | @@ -219,9 +219,9 @@ |
3390 | switch (event.getAction()) { |
3391 | case MotionEvent.ACTION_DOWN: |
3392 | if (this.svgDrawing.isPointInDrawing(x, y)) { |
3393 | - drawable = this.svgDrawing; |
3394 | + this.drawable = this.svgDrawing; |
3395 | } else if (this.userDrawing.isPointInDrawing(x, y)) { |
3396 | - drawable = this.userDrawing; |
3397 | + this.drawable = this.userDrawing; |
3398 | } |
3399 | if (null != this.drawable) { |
3400 | this.drawable.touchDown(x, y); |
3401 | @@ -493,7 +493,7 @@ |
3402 | this.touchX = x; |
3403 | this.touchY = y; |
3404 | this.path = new Path(); |
3405 | - this.paths.add(path); |
3406 | + this.paths.add(this.path); |
3407 | this.path.moveTo(x, y); |
3408 | super.strokesNumberPos.add(new PointF(x, y)); |
3409 | } |
3410 | @@ -745,7 +745,7 @@ |
3411 | char c = svgPath.charAt(i); |
3412 | boolean isLetter = Character.isLetter(c); |
3413 | |
3414 | - if (((intPartTen > 1 && c == '-') || c == ',' || (i > 0 && isLetter))) { |
3415 | + if (((intPartTen > 1 && c == '-') || c == ',' || (i > 0 && isLetter)) && null != params) { |
3416 | // end of the number, start of the new one |
3417 | float f = intPart; |
3418 | if (0 != floatPartTen) { |
3419 | @@ -795,7 +795,7 @@ |
3420 | } |
3421 | } |
3422 | |
3423 | - if (i == lastPos) { |
3424 | + if (i == lastPos && null != params) { |
3425 | // The last number |
3426 | float f = intPart; |
3427 | if (0 != floatPartTen) { |
3428 | @@ -828,7 +828,7 @@ |
3429 | public String toString() { |
3430 | StringBuilder sb = new StringBuilder(); |
3431 | |
3432 | - sb.append(cmd); |
3433 | + sb.append(this.cmd); |
3434 | int numF = this.params.size(); |
3435 | |
3436 | for (int i = 0; i < numF; i++) { |
3437 | @@ -846,7 +846,7 @@ |
3438 | |
3439 | boolean valid() { |
3440 | boolean ret = true; |
3441 | - int numParams = params.size(); |
3442 | + int numParams = this.params.size(); |
3443 | |
3444 | switch (this.cmd) { |
3445 | case 'c': |
3446 | |
3447 | === modified file 'NarauCupcake/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java' |
3448 | --- NarauCupcake/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java 2012-12-15 23:46:16 +0000 |
3449 | +++ NarauCupcake/src/org/vono/narau/common/kanji/KanjiViewDialogSeekBar.java 2012-12-18 18:47:22 +0000 |
3450 | @@ -112,7 +112,7 @@ |
3451 | this.dismiss(); |
3452 | Preferences.setFloat(this.idPrefName, this.fValue); |
3453 | if (null != this.dismissListener) { |
3454 | - dismissListener.onDialogDismiss(this); |
3455 | + this.dismissListener.onDialogDismiss(this); |
3456 | } |
3457 | } |
3458 | |
3459 | |
3460 | === modified file 'NarauCupcake/src/org/vono/narau/db/DictionaryDB.java' |
3461 | --- NarauCupcake/src/org/vono/narau/db/DictionaryDB.java 2012-12-15 23:46:16 +0000 |
3462 | +++ NarauCupcake/src/org/vono/narau/db/DictionaryDB.java 2012-12-18 18:47:22 +0000 |
3463 | @@ -470,8 +470,8 @@ |
3464 | public Entry next() { |
3465 | Entry entry = null; |
3466 | |
3467 | - if (null != super.cursor && !super.cursor.isClosed() && cursor.moveToNext()) { |
3468 | - int id = cursor.getInt(0); |
3469 | + if (null != super.cursor && !super.cursor.isClosed() && super.cursor.moveToNext()) { |
3470 | + int id = super.cursor.getInt(0); |
3471 | entry = DictionaryDB.loadEntry(id); |
3472 | } |
3473 | return entry; |
3474 | @@ -531,9 +531,9 @@ |
3475 | public Entry next() { |
3476 | if (null != this.cursor && this.cursor.moveToNext()) { |
3477 | |
3478 | - final int id = cursor.getInt(0); |
3479 | - final String keb = cursor.getString(1); |
3480 | - final String pri = cursor.getString(2); |
3481 | + final int id = super.cursor.getInt(0); |
3482 | + final String keb = super.cursor.getString(1); |
3483 | + final String pri = super.cursor.getString(2); |
3484 | |
3485 | // The kanji element |
3486 | Entry entry = new Entry(id); |
3487 | |
3488 | === modified file 'NarauCupcake/src/org/vono/narau/db/InfosDB.java' |
3489 | --- NarauCupcake/src/org/vono/narau/db/InfosDB.java 2012-12-15 23:46:16 +0000 |
3490 | +++ NarauCupcake/src/org/vono/narau/db/InfosDB.java 2012-12-18 18:47:22 +0000 |
3491 | @@ -189,6 +189,11 @@ |
3492 | return false; |
3493 | } |
3494 | |
3495 | + @Override |
3496 | + public int hashCode() { |
3497 | + return this.dbName.hashCode(); |
3498 | + } |
3499 | + |
3500 | /** |
3501 | * Parse a single line in narau_db_infos.txt file<br/> |
3502 | * |
3503 | |
3504 | === modified file 'NarauCupcake/src/org/vono/narau/db/KanjiDB.java' |
3505 | --- NarauCupcake/src/org/vono/narau/db/KanjiDB.java 2012-12-15 23:46:16 +0000 |
3506 | +++ NarauCupcake/src/org/vono/narau/db/KanjiDB.java 2012-12-18 18:47:22 +0000 |
3507 | @@ -604,7 +604,7 @@ |
3508 | public Kanji first() { |
3509 | Kanji kanji = null; |
3510 | if (this.cursor.moveToFirst()) { |
3511 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3512 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3513 | this.loadReading); |
3514 | this.current = 0; |
3515 | } |
3516 | @@ -618,7 +618,7 @@ |
3517 | public Kanji next() { |
3518 | Kanji kanji = null; |
3519 | if (!this.cursor.isClosed() && this.cursor.moveToNext()) { |
3520 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3521 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3522 | this.loadReading); |
3523 | this.current++; |
3524 | } |
3525 | @@ -632,7 +632,7 @@ |
3526 | public Kanji previous() { |
3527 | Kanji kanji = null; |
3528 | if (this.cursor.moveToPrevious()) { |
3529 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3530 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3531 | this.loadReading); |
3532 | this.current--; |
3533 | } |
3534 | @@ -646,7 +646,7 @@ |
3535 | public Kanji last() { |
3536 | Kanji kanji = null; |
3537 | if (this.cursor.moveToLast()) { |
3538 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3539 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3540 | this.loadReading); |
3541 | this.current = this.count; |
3542 | } |
3543 | @@ -666,7 +666,7 @@ |
3544 | if (!this.cursor.isClosed() && newPosition >= 0 && newPosition < this.count) { |
3545 | if (this.cursor.moveToPosition(newPosition)) { |
3546 | this.current = newPosition; |
3547 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3548 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3549 | this.loadReading); |
3550 | } |
3551 | } |
3552 | @@ -683,7 +683,7 @@ |
3553 | public Kanji get(int index) { |
3554 | Kanji kanji = null; |
3555 | if (this.cursor.moveToPosition(index)) { |
3556 | - kanji = KanjiDB.cursorToKanji(cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3557 | + kanji = KanjiDB.cursorToKanji(this.cursor, null, this.listLangDB, this.loadMeaning, this.loadSVG, |
3558 | this.loadReading); |
3559 | this.cursor.moveToPosition(this.current); |
3560 | } |
3561 | @@ -763,8 +763,8 @@ |
3562 | public Integer next() { |
3563 | this.codepoint = -1; |
3564 | if (!this.cursor.isAfterLast() && !this.cursor.isClosed()) { |
3565 | - if (cursor.moveToNext()) { |
3566 | - this.codepoint = cursor.getInt(0); |
3567 | + if (this.cursor.moveToNext()) { |
3568 | + this.codepoint = this.cursor.getInt(0); |
3569 | this.current++; |
3570 | } |
3571 | } |
3572 | @@ -779,8 +779,8 @@ |
3573 | public Integer previous() { |
3574 | this.codepoint = -1; |
3575 | if (!this.cursor.isBeforeFirst() && !this.cursor.isClosed()) { |
3576 | - if (cursor.moveToPrevious()) { |
3577 | - this.codepoint = cursor.getInt(0); |
3578 | + if (this.cursor.moveToPrevious()) { |
3579 | + this.codepoint = this.cursor.getInt(0); |
3580 | this.current--; |
3581 | } |
3582 | } |
3583 | @@ -795,8 +795,8 @@ |
3584 | public Integer first() { |
3585 | this.codepoint = -1; |
3586 | if (!this.cursor.isClosed()) { |
3587 | - if (cursor.moveToFirst()) { |
3588 | - this.codepoint = cursor.getInt(0); |
3589 | + if (this.cursor.moveToFirst()) { |
3590 | + this.codepoint = this.cursor.getInt(0); |
3591 | this.current = 0; |
3592 | } |
3593 | } |
3594 | @@ -811,8 +811,8 @@ |
3595 | public Integer last() { |
3596 | this.codepoint = -1; |
3597 | if (!this.cursor.isClosed()) { |
3598 | - if (cursor.moveToLast()) { |
3599 | - this.codepoint = cursor.getInt(0); |
3600 | + if (this.cursor.moveToLast()) { |
3601 | + this.codepoint = this.cursor.getInt(0); |
3602 | this.current = this.count; |
3603 | } |
3604 | } |
3605 | @@ -832,7 +832,7 @@ |
3606 | if (!this.cursor.isClosed() && newPosition >= 0 && newPosition < this.count) { |
3607 | if (this.cursor.moveToPosition(newPosition)) { |
3608 | this.current = newPosition; |
3609 | - this.codepoint = cursor.getInt(0); |
3610 | + this.codepoint = this.cursor.getInt(0); |
3611 | } |
3612 | } |
3613 | return this.codepoint; |
3614 | |
3615 | === modified file 'NarauCupcake/src/org/vono/narau/dictionary/DictionaryBase.java' |
3616 | --- NarauCupcake/src/org/vono/narau/dictionary/DictionaryBase.java 2012-12-16 19:16:57 +0000 |
3617 | +++ NarauCupcake/src/org/vono/narau/dictionary/DictionaryBase.java 2012-12-18 18:47:22 +0000 |
3618 | @@ -183,6 +183,7 @@ |
3619 | */ |
3620 | public abstract void onClickSearch(View button); |
3621 | |
3622 | + @SuppressWarnings("static-method") |
3623 | public void onClickZoom(final View buttonZoom) { |
3624 | // float value = Float.NaN; |
3625 | final int id = buttonZoom.getId(); |
3626 | @@ -328,6 +329,7 @@ |
3627 | } |
3628 | } |
3629 | |
3630 | + @SuppressWarnings("static-method") |
3631 | protected void addSearchResult(SearchResult sr) { |
3632 | if (sr instanceof OfflineResult) { |
3633 | HistoryDB.getHistoryDB().addOffileResult((OfflineResult) sr); |
3634 | |
3635 | === modified file 'NarauCupcake/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java' |
3636 | --- NarauCupcake/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java 2012-12-16 19:16:57 +0000 |
3637 | +++ NarauCupcake/src/org/vono/narau/dictionary/DictionaryOfflineActivity.java 2012-12-18 18:47:22 +0000 |
3638 | @@ -94,9 +94,10 @@ |
3639 | |
3640 | final ArrayList<Language> languagesDictionary = Preferences.getLangsPriorities(DatabaseType.dictonary); |
3641 | final int numLangs = languagesDictionary.size(); |
3642 | - final ArrayList<Language> languagesDisplay = new ArrayList<Language>(numLangs + 1); |
3643 | + final ArrayList<Language> languagesDisplay = new ArrayList<Language>(numLangs + 2); |
3644 | this.languageAuto = new Language(AUTO, AUTO, AUTO, super.getString(R.string.dictionaryOfflineAutoLang)); |
3645 | languagesDisplay.add(this.languageAuto); |
3646 | + languagesDisplay.add(Language.JAPANESE); |
3647 | for (int i = 0; i < numLangs; i++) { |
3648 | languagesDisplay.add(languagesDictionary.get(i)); |
3649 | } |
3650 | @@ -283,7 +284,7 @@ |
3651 | // updateMenuItemWordMatch(item, Preferences.getBoolean(R.string.prefNameDictionaryWordMatch)); |
3652 | // return true; |
3653 | // } |
3654 | - |
3655 | + |
3656 | @Override |
3657 | protected void onStop() { |
3658 | MenuCompat.closeMenu(R.menu.dictionary_offline); |
3659 | @@ -300,9 +301,8 @@ |
3660 | |
3661 | this.switchKeyboardVisible(); |
3662 | return true; |
3663 | - } else { |
3664 | - return super.onKeyUp(keyCode, event); |
3665 | } |
3666 | + return super.onKeyUp(keyCode, event); |
3667 | } |
3668 | |
3669 | @Override |
3670 | @@ -525,11 +525,11 @@ |
3671 | if (0 == numResult) { |
3672 | toastMessage = this.activity.getString(R.string.dictionaryNoResult); |
3673 | } else if (searchComplete) { |
3674 | - String toastMessageTemplate = activity.getString(R.string.toastNumWords); |
3675 | + String toastMessageTemplate = this.activity.getString(R.string.toastNumWords); |
3676 | toastMessage = String.format(toastMessageTemplate, DictionaryOfflineActivity.thread.searchText, |
3677 | numResult); |
3678 | } else { |
3679 | - String toastMessageTemplate = activity.getString(R.string.toastNumWordsInterrupt); |
3680 | + String toastMessageTemplate = this.activity.getString(R.string.toastNumWordsInterrupt); |
3681 | toastMessage = String.format(toastMessageTemplate, DictionaryOfflineActivity.thread.searchText, |
3682 | numResult); |
3683 | } |
3684 | |
3685 | === modified file 'NarauCupcake/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java' |
3686 | --- NarauCupcake/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java 2012-12-16 19:16:57 +0000 |
3687 | +++ NarauCupcake/src/org/vono/narau/dictionary/DictionaryOnlineActivity.java 2012-12-18 18:47:22 +0000 |
3688 | @@ -146,6 +146,9 @@ |
3689 | this.buttonLangDest = (Button) super.findViewById(R.id.dictionaryOnlineButtonLanguageDest); |
3690 | this.buttonLangSwap = (ImageButton) super.findViewById(R.id.dictionaryOnlineButtonLanguageSwap); |
3691 | |
3692 | + this.buttonLangSource.setOnClickListener(this); |
3693 | + this.buttonLangDest.setOnClickListener(this); |
3694 | + this.buttonLangSwap.setOnClickListener(this); |
3695 | super.buttonSearch.setOnLongClickListener(this); |
3696 | } |
3697 | |
3698 | @@ -311,7 +314,7 @@ |
3699 | this.updateCurrentLangPair(); |
3700 | this.updateButtonSearchText(); |
3701 | } |
3702 | - |
3703 | + |
3704 | @Override |
3705 | protected void onStop() { |
3706 | MenuCompat.closeMenu(R.menu.dictionary_online); |
3707 | @@ -324,9 +327,8 @@ |
3708 | if (null != menu) { |
3709 | super.switchKeyboardVisible(); |
3710 | return true; |
3711 | - } else { |
3712 | - return super.onKeyUp(keyCode, event); |
3713 | } |
3714 | + return super.onKeyUp(keyCode, event); |
3715 | } |
3716 | |
3717 | // @Override |
3718 | @@ -338,8 +340,6 @@ |
3719 | |
3720 | @Override |
3721 | public boolean onOptionsItemSelected(MenuItem item) { |
3722 | - Log.d(TAG, "onOptionsItemSelected " + item.getItemId() + " menuDictionarySelectService=" |
3723 | - + R.id.menuDictionarySelectService); |
3724 | switch (item.getItemId()) { |
3725 | case R.id.menuDictionarySelectService: |
3726 | this.onLongClick(null); |
3727 | @@ -426,8 +426,9 @@ |
3728 | private static StringBuilder getContent(InputStream iStream) throws IOException { |
3729 | StringBuilder sb = new StringBuilder(); |
3730 | |
3731 | - BufferedReader br = new BufferedReader(new InputStreamReader(iStream, "UTF-8")); |
3732 | - char[] buffer = new char[512]; |
3733 | + final int bufSize = 512; |
3734 | + BufferedReader br = new BufferedReader(new InputStreamReader(iStream, "UTF-8"), bufSize); |
3735 | + final char[] buffer = new char[bufSize]; |
3736 | |
3737 | int read = br.read(buffer); |
3738 | |
3739 | @@ -492,7 +493,7 @@ |
3740 | final String cookieURL = urisInfos[0]; |
3741 | if (null != cookieURL) { |
3742 | |
3743 | - final String serviceName = DictionaryOnlineActivity.this.getString(serviceId); |
3744 | + final String serviceName = DictionaryOnlineActivity.this.getString(this.serviceStringId); |
3745 | HistoryDB historyDB = HistoryDB.getHistoryDB(); |
3746 | |
3747 | CookieStore cookieStore = historyDB.getCookies(serviceName); |
3748 | @@ -577,6 +578,22 @@ |
3749 | |
3750 | DictionaryOnlineActivity.this.setWidgetEnabled(true); |
3751 | } |
3752 | + } |
3753 | |
3754 | + @Override |
3755 | + public void onClick(View v) { |
3756 | + switch (v.getId()) { |
3757 | + case R.id.dictionaryOnlineButtonLanguageDest: |
3758 | + this.onClickButtonLanguageDest(v); |
3759 | + break; |
3760 | + case R.id.dictionaryOnlineButtonLanguageSource: |
3761 | + this.onClickButtonLanguageSource(v); |
3762 | + break; |
3763 | + case R.id.dictionaryOnlineButtonLanguageSwap: |
3764 | + this.onClickSwapLanguages(v); |
3765 | + break; |
3766 | + default: |
3767 | + super.onClick(v); |
3768 | + } |
3769 | } |
3770 | } |
3771 | |
3772 | === modified file 'NarauCupcake/src/org/vono/narau/dictionary/HistoryFragment.java' |
3773 | --- NarauCupcake/src/org/vono/narau/dictionary/HistoryFragment.java 2012-12-15 23:46:16 +0000 |
3774 | +++ NarauCupcake/src/org/vono/narau/dictionary/HistoryFragment.java 2012-12-18 18:47:22 +0000 |
3775 | @@ -92,7 +92,7 @@ |
3776 | |
3777 | public SearchAdapter(Context context, DictionaryType type) { |
3778 | super(context, R.layout.dictionary_search_result_item); |
3779 | - mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
3780 | + this.mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); |
3781 | // if (android.os.Build.VERSION.SDK_INT >= |
3782 | // android.os.Build.VERSION_CODES.HONEYCOMB) { |
3783 | // super.addAll(HistoryDB.getHistoryDB().getAll()); |
3784 | |
3785 | === modified file 'NarauCupcake/src/org/vono/narau/download/DownloaderActivity.java' |
3786 | --- NarauCupcake/src/org/vono/narau/download/DownloaderActivity.java 2012-12-15 23:46:16 +0000 |
3787 | +++ NarauCupcake/src/org/vono/narau/download/DownloaderActivity.java 2012-12-18 18:47:22 +0000 |
3788 | @@ -394,7 +394,7 @@ |
3789 | } |
3790 | } |
3791 | |
3792 | - if (numSubAvail == 0 && dbInfo.action == Action.none) { |
3793 | + if (numSubAvail == 0 && dbInfo.action == Action.none && null != firstSub) { |
3794 | if (v != dbInfo.checkBox) { |
3795 | // Mark the main db as to be deleted |
3796 | // Rerun all |
3797 | @@ -446,7 +446,7 @@ |
3798 | } |
3799 | } |
3800 | |
3801 | - if (0 == numSubAvail) { |
3802 | + if (0 == numSubAvail && null != firstSub) { |
3803 | if (firstSub.haveLatest()) { |
3804 | firstSub.checkBox.setChecked(false); |
3805 | firstSub.action = Action.none; |
3806 | @@ -760,7 +760,7 @@ |
3807 | tvUpdate.setVisibility(View.GONE); |
3808 | } |
3809 | |
3810 | - } else { |
3811 | + } else if (null != currentMainDB) { |
3812 | viewGroup = (ViewGroup) inflater.inflate(R.layout.download_question_cb_sub, null); |
3813 | DownloaderActivity.genNewViewIds(i, viewGroup); |
3814 | |
3815 | |
3816 | === modified file 'NarauCupcake/src/org/vono/narau/download/DownloaderGzipDB.java' |
3817 | --- NarauCupcake/src/org/vono/narau/download/DownloaderGzipDB.java 2012-12-15 23:46:16 +0000 |
3818 | +++ NarauCupcake/src/org/vono/narau/download/DownloaderGzipDB.java 2012-12-18 18:47:22 +0000 |
3819 | @@ -118,7 +118,7 @@ |
3820 | |
3821 | @Override |
3822 | public int read() throws IOException { |
3823 | - int readByte = in.read(); |
3824 | + int readByte = this.in.read(); |
3825 | if (readByte != -1) { |
3826 | this.readCount++; |
3827 | if (null != this.messageDigest) { |
3828 | @@ -302,7 +302,7 @@ |
3829 | |
3830 | } // for |
3831 | |
3832 | - if (!success && requestStop) { |
3833 | + if (!this.success && requestStop) { |
3834 | dbInfo.file.delete(); |
3835 | } |
3836 | |
3837 | |
3838 | === modified file 'NarauCupcake/src/org/vono/narau/exercise/DrillCharActivity.java' |
3839 | --- NarauCupcake/src/org/vono/narau/exercise/DrillCharActivity.java 2012-12-15 23:46:16 +0000 |
3840 | +++ NarauCupcake/src/org/vono/narau/exercise/DrillCharActivity.java 2012-12-18 18:47:22 +0000 |
3841 | @@ -42,11 +42,11 @@ |
3842 | import android.view.KeyEvent; |
3843 | import android.view.View; |
3844 | import android.view.View.OnClickListener; |
3845 | +import android.view.ViewGroup; |
3846 | import android.widget.Button; |
3847 | import android.widget.ProgressBar; |
3848 | import android.widget.TableLayout; |
3849 | import android.widget.TableRow; |
3850 | -import android.widget.TableRow.LayoutParams; |
3851 | import android.widget.TextView; |
3852 | |
3853 | /** |
3854 | @@ -103,7 +103,7 @@ |
3855 | DrillCharActivity.progressHandler = new ProgressHandler(); |
3856 | } |
3857 | |
3858 | - testState = TestState.ERROR; |
3859 | + this.testState = TestState.ERROR; |
3860 | if (savedInstanceState == null) { |
3861 | // New start |
3862 | if (DrillCharActivity.threadLoadKanji != null) { |
3863 | @@ -122,7 +122,7 @@ |
3864 | final Serializable sIC = extra.getSerializable(KanjiArrayAdapter.ITEM_CATEGORY); |
3865 | final String direction = extra.getString(DrillMenuActivity.DRILL_DIRECTION); |
3866 | if (initDrillQA(sIC, direction)) { |
3867 | - testState = TestState.NEW; |
3868 | + this.testState = TestState.NEW; |
3869 | } |
3870 | } else { |
3871 | // Pass here when there is for example a screen rotation |
3872 | @@ -130,7 +130,7 @@ |
3873 | this.testState = TestState.valueOf(savedInstanceState.getString(ST_TS)); |
3874 | this.testType = TestType.valueOf(savedInstanceState.getString(ST_TT)); |
3875 | |
3876 | - if (testState == TestState.IN_PROGRESS && DrillCharActivity.threadLoadKanji != null |
3877 | + if (this.testState == TestState.IN_PROGRESS && DrillCharActivity.threadLoadKanji != null |
3878 | && DrillCharActivity.progressHandler.activity != null) { |
3879 | DrillCharActivity.progressHandler.setActivity(this); |
3880 | DrillCharActivity.progressHandler.progressDialog = ProgressDialog.show(this, Common.EMPTY_STRING, |
3881 | @@ -138,7 +138,7 @@ |
3882 | } |
3883 | } |
3884 | |
3885 | - switch (testState) { |
3886 | + switch (this.testState) { |
3887 | case DONE: |
3888 | this.initUIResult(); |
3889 | break; |
3890 | @@ -250,7 +250,7 @@ |
3891 | private void initUI(Bundle savedInstanceState) { |
3892 | this.listButtons = new ArrayList<Button>(NUM_ANSWERS); |
3893 | |
3894 | - switch (testType) { |
3895 | + switch (this.testType) { |
3896 | case KANA_ROMANJI: |
3897 | case ROMANJI_KANA: |
3898 | super.setContentView(R.layout.drill_kana); |
3899 | @@ -291,7 +291,7 @@ |
3900 | this.textViewGood = (TextView) super.findViewById(R.id.drillTextViewGoodAnswer); |
3901 | this.textViewBad = (TextView) super.findViewById(R.id.drillTextViewBadAnswer); |
3902 | |
3903 | - if (testType == TestType.ROMANJI_KANA) { |
3904 | + if (this.testType == TestType.ROMANJI_KANA) { |
3905 | this.textViewQuestion.setTextAppearance(super.getApplicationContext(), android.R.attr.textAppearanceLarge); |
3906 | this.textViewQuestion.setTextSize(30.0f); |
3907 | } |
3908 | @@ -355,8 +355,8 @@ |
3909 | final int max = DrillCharActivity.progressHandler.numKanji; |
3910 | final Context context = super.getApplicationContext(); |
3911 | final ArrayList<DrillQA> drillQA = DrillCharActivity.progressHandler.drillQA; |
3912 | - final TableRow.LayoutParams lpTv = new TableRow.LayoutParams(LayoutParams.MATCH_PARENT, |
3913 | - LayoutParams.WRAP_CONTENT, 1 / 3.0f); |
3914 | + final TableRow.LayoutParams lpTv = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
3915 | + ViewGroup.LayoutParams.WRAP_CONTENT, 1 / 3.0f); |
3916 | |
3917 | lpTv.setMargins(0, 3, 0, 3); |
3918 | |
3919 | @@ -416,7 +416,7 @@ |
3920 | Button button = (Button) v; |
3921 | if (dqa.answer != button.getText().toString()) { |
3922 | // Bad response |
3923 | - textViewBad.setText(dqa.question + " ≠ " + button.getText().toString()); |
3924 | + this.textViewBad.setText(dqa.question + " ≠ " + button.getText().toString()); |
3925 | this.textViewBad.setVisibility(View.VISIBLE); |
3926 | dqa.userAnswer = button.getText().toString(); |
3927 | DrillCharActivity.progressHandler.numBadResponse++; |
3928 | @@ -458,6 +458,12 @@ |
3929 | dqa.see = true; |
3930 | } |
3931 | } |
3932 | + |
3933 | + if (null == dqa) { |
3934 | + Log.e(TAG, "nextQuestion: dqa must not be null at this point"); |
3935 | + return; |
3936 | + } |
3937 | + |
3938 | DrillCharActivity.progressHandler.currentTest = dqa; |
3939 | this.textViewQuestion.setText(dqa.question); |
3940 | |
3941 | @@ -541,12 +547,12 @@ |
3942 | super.onSaveInstanceState(savedInstanceState); |
3943 | savedInstanceState.putString(ST_TS, this.testState.name()); |
3944 | savedInstanceState.putString(ST_TT, this.testType.name()); |
3945 | - if (testState != TestState.DONE) { |
3946 | + if (this.testState != TestState.DONE) { |
3947 | savedInstanceState.putCharSequence(ST_TG, this.textViewGood.getText()); |
3948 | savedInstanceState.putCharSequence(ST_TB, this.textViewBad.getText()); |
3949 | ArrayList<String> buttonsText = new ArrayList<String>(NUM_ANSWERS); |
3950 | for (int i = 0; i < NUM_ANSWERS; i++) { |
3951 | - buttonsText.add(listButtons.get(i).getText().toString()); |
3952 | + buttonsText.add(this.listButtons.get(i).getText().toString()); |
3953 | } |
3954 | savedInstanceState.putStringArrayList(ST_BT, buttonsText); |
3955 | } |
3956 | @@ -584,8 +590,8 @@ |
3957 | |
3958 | DrillCharActivity.threadLoadKanji = this; |
3959 | |
3960 | - KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(selection, selectionArgs, true, false, |
3961 | - false); |
3962 | + KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(this.selection, this.selectionArgs, true, |
3963 | + false, false); |
3964 | kanjiIterator.first(); |
3965 | final int num = kanjiIterator.getCount(); |
3966 | |
3967 | |
3968 | === modified file 'NarauCupcake/src/org/vono/narau/learn/reading/KanaChartActivity.java' |
3969 | --- NarauCupcake/src/org/vono/narau/learn/reading/KanaChartActivity.java 2012-12-15 23:46:16 +0000 |
3970 | +++ NarauCupcake/src/org/vono/narau/learn/reading/KanaChartActivity.java 2012-12-18 18:47:22 +0000 |
3971 | @@ -49,9 +49,8 @@ |
3972 | // KanaChartActivity.class.getSimpleName(); |
3973 | |
3974 | static final int TYPE_MASK = KanjiData.KANA_CHART; |
3975 | - |
3976 | + |
3977 | private static HashMap<Common.KanaType, KanaChartActivity.TableScrollView> views; |
3978 | - |
3979 | |
3980 | static { |
3981 | KanaChartActivity.views = new HashMap<Common.KanaType, KanaChartActivity.TableScrollView>(2); |
3982 | @@ -100,12 +99,12 @@ |
3983 | } |
3984 | |
3985 | int count = kanaChartArray.length; |
3986 | - TableRow.LayoutParams lpOne = new TableRow.LayoutParams( |
3987 | - TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT); |
3988 | + TableRow.LayoutParams lpOne = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
3989 | + ViewGroup.LayoutParams.WRAP_CONTENT); |
3990 | lpOne.span = 5; |
3991 | |
3992 | - TableRow.LayoutParams lpSix = new TableRow.LayoutParams( |
3993 | - TableRow.LayoutParams.MATCH_PARENT, TableRow.LayoutParams.WRAP_CONTENT); |
3994 | + TableRow.LayoutParams lpSix = new TableRow.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, |
3995 | + ViewGroup.LayoutParams.WRAP_CONTENT); |
3996 | lpSix.setMargins(0, 3, 0, 3); |
3997 | |
3998 | for (int i = 0; i < count; i++) { |
3999 | @@ -128,14 +127,13 @@ |
4000 | TextView tv = new TextView(context); |
4001 | // tv.setBackgroundColor(Color.BLUE); |
4002 | |
4003 | - String romanji = Common.convertKana(line[j], wc.type, |
4004 | - Common.KanaType.ROMANJI); |
4005 | + String romanji = Common.convertKana(line[j], wc.type, Common.KanaType.ROMANJI); |
4006 | tv.setTextSize(30); |
4007 | tv.setGravity(Gravity.CENTER); |
4008 | |
4009 | tv.setText(kana + "\n" + romanji); |
4010 | - LayoutParams lp = new LinearLayout.LayoutParams( |
4011 | - LayoutParams.WRAP_CONTENT, LayoutParams.MATCH_PARENT, 1.0f); |
4012 | + LayoutParams lp = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, |
4013 | + ViewGroup.LayoutParams.MATCH_PARENT, 1.0f); |
4014 | tv.setLayoutParams(lp); |
4015 | |
4016 | row.addView(tv, lpSix); |
4017 | @@ -184,7 +182,7 @@ |
4018 | // to make all the kana TextView's have the same size. |
4019 | int tvW = w / 5; |
4020 | if (w > 0) { |
4021 | - for (TextView tv : listTV) { |
4022 | + for (TextView tv : this.listTV) { |
4023 | tv.setWidth(tvW); |
4024 | } |
4025 | } |
4026 | |
4027 | === modified file 'NarauCupcake/src/org/vono/narau/learn/reading/KanjiToWordActivity.java' |
4028 | --- NarauCupcake/src/org/vono/narau/learn/reading/KanjiToWordActivity.java 2012-12-16 19:16:57 +0000 |
4029 | +++ NarauCupcake/src/org/vono/narau/learn/reading/KanjiToWordActivity.java 2012-12-18 18:47:22 +0000 |
4030 | @@ -47,11 +47,12 @@ |
4031 | import android.view.Menu; |
4032 | import android.view.MenuItem; |
4033 | import android.view.View; |
4034 | +import android.view.View.OnClickListener; |
4035 | import android.widget.ImageButton; |
4036 | import android.widget.TextView; |
4037 | import android.widget.Toast; |
4038 | |
4039 | -public class KanjiToWordActivity extends FragmentActivity { |
4040 | +public class KanjiToWordActivity extends FragmentActivity implements OnClickListener { |
4041 | private static final String TAG = KanjiToWordActivity.class.getSimpleName(); |
4042 | private static final String CURRENT_POSITION = "CP"; |
4043 | private static final String LOAD_KANJIS_DONE = "lkd"; |
4044 | @@ -242,21 +243,20 @@ |
4045 | // inflater.inflate(R.menu.kanji_to_words, menu); |
4046 | // return true; |
4047 | // } |
4048 | - |
4049 | + |
4050 | @Override |
4051 | protected void onStop() { |
4052 | MenuCompat.closeMenu(R.menu.kanji_to_words); |
4053 | super.onStop(); |
4054 | } |
4055 | - |
4056 | + |
4057 | @Override |
4058 | public boolean onKeyUp(int keyCode, KeyEvent event) { |
4059 | Menu menu = MenuCompat.onKeyUp(this, keyCode, R.menu.kanji_to_words); |
4060 | if (null != menu) { |
4061 | return true; |
4062 | - } else { |
4063 | - return super.onKeyUp(keyCode, event); |
4064 | } |
4065 | + return super.onKeyUp(keyCode, event); |
4066 | } |
4067 | |
4068 | @Override |
4069 | @@ -289,6 +289,9 @@ |
4070 | this.entryListFragment = (EntryListFragment) super.getSupportFragmentManager().findFragmentById( |
4071 | R.id.kanjiToWordsEntryList); |
4072 | |
4073 | + this.buttonNext.setOnClickListener(this); |
4074 | + this.buttonPrevious.setOnClickListener(this); |
4075 | + |
4076 | } |
4077 | |
4078 | private void showAllKanjis() { |
4079 | @@ -502,8 +505,8 @@ |
4080 | @Override |
4081 | public void run() { |
4082 | |
4083 | - final KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(selection, selectionArgs, true, |
4084 | - false, true); |
4085 | + final KanjiDB.KanjiDBIterator kanjiIterator = KanjiDB.getKanjiIterator(this.selection, this.selectionArgs, |
4086 | + true, false, true); |
4087 | |
4088 | Kanji kanji = kanjiIterator.first(); |
4089 | int count = 0; |
4090 | @@ -795,4 +798,16 @@ |
4091 | } |
4092 | } |
4093 | |
4094 | + public void onClick(View button) { |
4095 | + switch (button.getId()) { |
4096 | + case R.id.kanjiToWordsButtonNext: |
4097 | + this.nextKanji(button); |
4098 | + break; |
4099 | + case R.id.kanjiToWordsButtonPrevious: |
4100 | + this.previousKanji(button); |
4101 | + break; |
4102 | + } |
4103 | + |
4104 | + } |
4105 | + |
4106 | } |
4107 | |
4108 | === modified file 'NarauCupcake/src/org/vono/narau/learn/writing/LearnWritingActivity.java' |
4109 | --- NarauCupcake/src/org/vono/narau/learn/writing/LearnWritingActivity.java 2012-12-16 19:16:57 +0000 |
4110 | +++ NarauCupcake/src/org/vono/narau/learn/writing/LearnWritingActivity.java 2012-12-18 18:47:22 +0000 |
4111 | @@ -43,6 +43,7 @@ |
4112 | import android.view.Menu; |
4113 | import android.view.MenuItem; |
4114 | import android.view.View; |
4115 | +import android.view.View.OnClickListener; |
4116 | import android.widget.ImageButton; |
4117 | import android.widget.TextView; |
4118 | |
4119 | @@ -50,7 +51,8 @@ |
4120 | * |
4121 | * |
4122 | */ |
4123 | -public class LearnWritingActivity extends FragmentActivity implements KanjiViewDialogSeekBar.OnDismissListener { |
4124 | +public class LearnWritingActivity extends FragmentActivity implements KanjiViewDialogSeekBar.OnDismissListener, |
4125 | + OnClickListener { |
4126 | private static final String TAG = LearnWritingActivity.class.getSimpleName(); |
4127 | private static final String CURRENT_POSITION = "CP"; |
4128 | static final int TYPE_MASK = KanjiData.KANA_CHAR | KanjiData.KANJI_JLPT | KanjiData.KANJI_GRADE |
4129 | @@ -123,6 +125,13 @@ |
4130 | this.buttonNext = (ImageButton) super.findViewById(R.id.learnWritingButtonNext); |
4131 | this.buttonPrevious = (ImageButton) super.findViewById(R.id.learnWritingButtonPrevious); |
4132 | |
4133 | + ImageButton buttonErase = (ImageButton) super.findViewById(R.id.learnWritingButtonClear); |
4134 | + ImageButton buttonPlay = (ImageButton) super.findViewById(R.id.learnWritingButtonPlay); |
4135 | + this.buttonNext.setOnClickListener(this); |
4136 | + this.buttonPrevious.setOnClickListener(this); |
4137 | + buttonErase.setOnClickListener(this); |
4138 | + buttonPlay.setOnClickListener(this); |
4139 | + |
4140 | String selection = sbSelection.toString(); |
4141 | String[] selectionArgs = selectionArgsList.toArray(new String[0]); |
4142 | |
4143 | @@ -187,9 +196,8 @@ |
4144 | } |
4145 | |
4146 | return true; |
4147 | - } else { |
4148 | - return super.onKeyUp(keyCode, event); |
4149 | } |
4150 | + return super.onKeyUp(keyCode, event); |
4151 | } |
4152 | |
4153 | @Override |
4154 | @@ -482,7 +490,7 @@ |
4155 | |
4156 | @Override |
4157 | public void run() { |
4158 | - final KanjiDB.KanjiSVGIterator kanjiIteratorUnicode = KanjiDB.getKanjiSVGIterator(selection, selectionArgs); |
4159 | + final KanjiDB.KanjiSVGIterator kanjiIteratorUnicode = KanjiDB.getKanjiSVGIterator(this.selection, this.selectionArgs); |
4160 | |
4161 | int codepoint = kanjiIteratorUnicode.first(); |
4162 | while (codepoint != -1) { |
4163 | @@ -522,15 +530,32 @@ |
4164 | |
4165 | @Override |
4166 | public void handleMessage(Message msg) { |
4167 | - if (LOAD_DONE == msg.what && null != activity) { |
4168 | - if (null != activity.progressDialog) { |
4169 | - activity.progressDialog.dismiss(); |
4170 | - activity.progressDialog = null; |
4171 | + if (LOAD_DONE == msg.what && null != this.activity) { |
4172 | + if (null != this.activity.progressDialog) { |
4173 | + this.activity.progressDialog.dismiss(); |
4174 | + this.activity.progressDialog = null; |
4175 | } |
4176 | - activity.currentPosition = 0; |
4177 | - activity.updateCurrentPosition(); |
4178 | + this.activity.currentPosition = 0; |
4179 | + this.activity.updateCurrentPosition(); |
4180 | } |
4181 | } |
4182 | } |
4183 | |
4184 | + public void onClick(View v) { |
4185 | + switch (v.getId()) { |
4186 | + case R.id.learnWritingButtonClear: |
4187 | + this.clearUserDrawing(v); |
4188 | + break; |
4189 | + case R.id.learnWritingButtonNext: |
4190 | + this.nextKanji(v); |
4191 | + break; |
4192 | + case R.id.learnWritingButtonPlay: |
4193 | + this.playKanji(v); |
4194 | + break; |
4195 | + case R.id.learnWritingButtonPrevious: |
4196 | + this.previousKanji(v); |
4197 | + break; |
4198 | + } |
4199 | + } |
4200 | + |
4201 | } |
4202 | |
4203 | === modified file 'NarauCupcake/src/org/vono/narau/models/dictionary/Entry.java' |
4204 | --- NarauCupcake/src/org/vono/narau/models/dictionary/Entry.java 2012-12-15 23:46:16 +0000 |
4205 | +++ NarauCupcake/src/org/vono/narau/models/dictionary/Entry.java 2012-12-18 18:47:22 +0000 |
4206 | @@ -33,9 +33,8 @@ |
4207 | * <p> |
4208 | * entry (ent_seq, k_ele*, r_ele+, info?, sense+) |
4209 | * </p> |
4210 | - * Entries consist of kanji elements, reading elements, general information and |
4211 | - * sense elements. Each entry must have at least one reading element and one |
4212 | - * sense element. Others are optional. |
4213 | + * Entries consist of kanji elements, reading elements, general information and sense elements. Each |
4214 | + * entry must have at least one reading element and one sense element. Others are optional. |
4215 | * |
4216 | */ |
4217 | public class Entry implements Comparable<Entry>, Parcelable { |
4218 | @@ -63,8 +62,7 @@ |
4219 | public ArrayList<ReadingElement> r_ele; |
4220 | |
4221 | /** |
4222 | - * The sense element will record the translational equivalent of the |
4223 | - * Japanese word |
4224 | + * The sense element will record the translational equivalent of the Japanese word |
4225 | */ |
4226 | public ArrayList<Sense> senses; |
4227 | |
4228 | @@ -98,7 +96,7 @@ |
4229 | |
4230 | public boolean haveLang(String lang) { |
4231 | if (null != this.senses) { |
4232 | - for (Sense s : senses) { |
4233 | + for (Sense s : this.senses) { |
4234 | if (s.glosses.containsKey(lang)) { |
4235 | return true; |
4236 | } |
4237 | @@ -124,7 +122,7 @@ |
4238 | public String getFirstGloss() { |
4239 | if (null != this.senses) { |
4240 | final ArrayList<Language> languages = Preferences.getLangsPriorities(DatabaseType.dictonary); |
4241 | - for (Sense s : senses) { |
4242 | + for (Sense s : this.senses) { |
4243 | final HashMap<Language, String> glosses = s.glosses; |
4244 | for (Language language : languages) { |
4245 | if (glosses.containsKey(language)) { |
4246 | @@ -353,8 +351,8 @@ |
4247 | |
4248 | /** |
4249 | * Sort for the KanjiToWords<br/> |
4250 | - * This is not a very good sorting method, but it seems to work. At least |
4251 | - * the result is better with than without :-)<br/> |
4252 | + * This is not a very good sorting method, but it seems to work. At least the result is better |
4253 | + * with than without :-)<br/> |
4254 | * This is an ugly code! |
4255 | */ |
4256 | private void makeSortOrder() { |
4257 | @@ -404,6 +402,11 @@ |
4258 | return false; |
4259 | } |
4260 | |
4261 | + @Override |
4262 | + public int hashCode() { |
4263 | + return this.sequence; |
4264 | + } |
4265 | + |
4266 | /** |
4267 | * <p> |
4268 | * Compare the frequencies of this Japanese entry. |
4269 | |
4270 | === modified file 'NarauCupcake/src/org/vono/narau/models/history/OnlineResult.java' |
4271 | --- NarauCupcake/src/org/vono/narau/models/history/OnlineResult.java 2012-12-15 23:46:16 +0000 |
4272 | +++ NarauCupcake/src/org/vono/narau/models/history/OnlineResult.java 2012-12-18 18:47:22 +0000 |
4273 | @@ -86,6 +86,7 @@ |
4274 | return this.service + "\n" + this.sourceLang.displayName + "/" + this.destLang.displayName; |
4275 | } |
4276 | |
4277 | + @SuppressWarnings("cast") |
4278 | @Override |
4279 | public long getId() { |
4280 | return ((long) this.searchTerm.hashCode()) + ((long) this.sourceLang.langISO3.hashCode()) |
4281 | |
4282 | === modified file 'NarauCupcake/src/org/vono/narau/models/history/SearchResult.java' |
4283 | --- NarauCupcake/src/org/vono/narau/models/history/SearchResult.java 2012-12-15 23:46:16 +0000 |
4284 | +++ NarauCupcake/src/org/vono/narau/models/history/SearchResult.java 2012-12-18 18:47:22 +0000 |
4285 | @@ -77,6 +77,11 @@ |
4286 | return equal; |
4287 | } |
4288 | |
4289 | + @Override |
4290 | + public int hashCode() { |
4291 | + return Long.valueOf(this.getId()).hashCode(); |
4292 | + } |
4293 | + |
4294 | public abstract String getDisplayLanguage(); |
4295 | |
4296 | public abstract long getId(); |
4297 | |
4298 | === modified file 'NarauCupcake/src/org/vono/narau/models/kanji/KanjiData.java' |
4299 | --- NarauCupcake/src/org/vono/narau/models/kanji/KanjiData.java 2012-12-15 23:46:16 +0000 |
4300 | +++ NarauCupcake/src/org/vono/narau/models/kanji/KanjiData.java 2012-12-18 18:47:22 +0000 |
4301 | @@ -146,7 +146,7 @@ |
4302 | |
4303 | public void setSelection(boolean value) { |
4304 | this.selected = value; |
4305 | - Preferences.getSP().edit().putBoolean(prefName, value).commit(); |
4306 | + Preferences.getSP().edit().putBoolean(this.prefName, value).commit(); |
4307 | } |
4308 | |
4309 | @Override |
4310 | |
4311 | === modified file 'NarauCupcake/src/org/vono/narau/preferences/Preferences.java' |
4312 | --- NarauCupcake/src/org/vono/narau/preferences/Preferences.java 2012-12-15 23:46:16 +0000 |
4313 | +++ NarauCupcake/src/org/vono/narau/preferences/Preferences.java 2012-12-18 18:47:22 +0000 |
4314 | @@ -305,6 +305,8 @@ |
4315 | case kanji: |
4316 | key = Common.getResourcesString(R.string.prefNameKanjiLangPrio); |
4317 | break; |
4318 | + default: |
4319 | + return; |
4320 | } |
4321 | |
4322 | langsPriorities.put(database, values); |
4323 | |
4324 | === modified file 'NarauCupcake/src/org/vono/narau/preferences/PreferencesActivity.java' |
4325 | --- NarauCupcake/src/org/vono/narau/preferences/PreferencesActivity.java 2012-12-16 19:16:57 +0000 |
4326 | +++ NarauCupcake/src/org/vono/narau/preferences/PreferencesActivity.java 2012-12-18 18:47:22 +0000 |
4327 | @@ -48,7 +48,7 @@ |
4328 | // inflater.inflate(R.menu.preferences, menu); |
4329 | // return true; |
4330 | // } |
4331 | - |
4332 | + |
4333 | @Override |
4334 | protected void onStop() { |
4335 | MenuCompat.closeMenu(R.menu.preferences); |
4336 | @@ -60,9 +60,8 @@ |
4337 | Menu menu = MenuCompat.onKeyUp(this, keyCode, R.menu.preferences); |
4338 | if (null != menu) { |
4339 | return true; |
4340 | - } else { |
4341 | - return super.onKeyUp(keyCode, event); |
4342 | } |
4343 | + return super.onKeyUp(keyCode, event); |
4344 | } |
4345 | |
4346 | @Override |
4347 | |
4348 | === modified file 'NarauCupcake/src/org/vono/narau/utils/FontFitTextView.java' |
4349 | --- NarauCupcake/src/org/vono/narau/utils/FontFitTextView.java 2012-12-15 23:46:16 +0000 |
4350 | +++ NarauCupcake/src/org/vono/narau/utils/FontFitTextView.java 2012-12-18 18:47:22 +0000 |
4351 | @@ -64,10 +64,10 @@ |
4352 | */ |
4353 | private void initComponent() { |
4354 | // Context c, AttributeSet attrs, int defStyle |
4355 | - paint = new Paint(); |
4356 | - paint.setTextSize(10); |
4357 | - paint.setTextAlign(Align.CENTER); |
4358 | - paint.setAntiAlias(true); |
4359 | + this.paint = new Paint(); |
4360 | + this.paint.setTextSize(10); |
4361 | + this.paint.setTextAlign(Align.CENTER); |
4362 | + this.paint.setAntiAlias(true); |
4363 | |
4364 | // FIXME: Get background/foreground colors from style |
4365 | |
4366 | @@ -113,12 +113,12 @@ |
4367 | // TypedArray a = theme.obtainStyledAttributes(attrs, styles, defStyle, |
4368 | // 0); |
4369 | |
4370 | - paint.setColor(Color.WHITE); |
4371 | + this.paint.setColor(Color.WHITE); |
4372 | } |
4373 | |
4374 | public void setFontColor(int c) { |
4375 | // TODO use style to get the text color |
4376 | - paint.setColor(c); |
4377 | + this.paint.setColor(c); |
4378 | } |
4379 | |
4380 | /** |
4381 | @@ -156,8 +156,8 @@ |
4382 | // DisplayMetrics metrics = |
4383 | // super.getContext().getResources().getDisplayMetrics(); |
4384 | |
4385 | - paint.setTextSize(fontSize); |
4386 | - paint.getTextBounds(s, 0, s.length(), rect); |
4387 | + this.paint.setTextSize(fontSize); |
4388 | + this.paint.getTextBounds(s, 0, s.length(), rect); |
4389 | txtWidth = rect.width(); |
4390 | txtHeight = rect.height(); |
4391 | if (txtWidth > availableWidth || txtHeight > availableHeight) { |
4392 | @@ -165,8 +165,8 @@ |
4393 | } |
4394 | |
4395 | while (!gotIt) { |
4396 | - paint.setTextSize(fontSize); |
4397 | - paint.getTextBounds(s, 0, s.length(), rect); |
4398 | + this.paint.setTextSize(fontSize); |
4399 | + this.paint.getTextBounds(s, 0, s.length(), rect); |
4400 | txtWidth = rect.width(); |
4401 | txtHeight = rect.height(); |
4402 | |
4403 | @@ -258,7 +258,7 @@ |
4404 | String text = getText().toString(); |
4405 | if (text.length() > 0) { |
4406 | calcTextSize(text, canvas); |
4407 | - canvas.drawText(text, calcStartDrawingPosX(), calcStartDrawingPosY(), paint); |
4408 | + canvas.drawText(text, calcStartDrawingPosX(), calcStartDrawingPosY(), this.paint); |
4409 | } |
4410 | }; |
4411 | |
4412 | |
4413 | === modified file 'NarauCupcake/src/org/vono/narau/utils/JsonReader.java' |
4414 | --- NarauCupcake/src/org/vono/narau/utils/JsonReader.java 2012-12-15 23:46:16 +0000 |
4415 | +++ NarauCupcake/src/org/vono/narau/utils/JsonReader.java 2012-12-18 18:47:22 +0000 |
4416 | @@ -174,6 +174,7 @@ |
4417 | * Each {@code JsonReader} may be used to read a single JSON stream. Instances of this class are not |
4418 | * thread safe. |
4419 | */ |
4420 | +@SuppressWarnings("unqualified-field-access") |
4421 | public final class JsonReader implements Closeable { |
4422 | |
4423 | private static final String TRUE = "true"; |
4424 | @@ -321,16 +322,16 @@ |
4425 | * Returns the type of the next token without consuming it. |
4426 | */ |
4427 | public JsonToken peek() throws IOException { |
4428 | - if (token != null) { |
4429 | - return token; |
4430 | + if (this.token != null) { |
4431 | + return this.token; |
4432 | } |
4433 | |
4434 | switch (peekStack()) { |
4435 | case EMPTY_DOCUMENT: |
4436 | replaceTop(JsonScope.NONEMPTY_DOCUMENT); |
4437 | JsonToken firstToken = nextValue(); |
4438 | - if (!lenient && token != JsonToken.BEGIN_ARRAY && token != JsonToken.BEGIN_OBJECT) { |
4439 | - throw new IOException("Expected JSON document to start with '[' or '{' but was " + token); |
4440 | + if (!this.lenient && this.token != JsonToken.BEGIN_ARRAY && this.token != JsonToken.BEGIN_OBJECT) { |
4441 | + throw new IOException("Expected JSON document to start with '[' or '{' but was " + this.token); |
4442 | } |
4443 | return firstToken; |
4444 | case EMPTY_ARRAY: |
4445 | @@ -484,7 +485,7 @@ |
4446 | } catch (NumberFormatException ignored) { |
4447 | double asDouble = Double.parseDouble(value); // don't catch this NumberFormatException |
4448 | result = (long) asDouble; |
4449 | - if ((double) result != asDouble) { |
4450 | + if (result != asDouble) { |
4451 | throw new NumberFormatException(value); |
4452 | } |
4453 | } |
4454 | @@ -516,7 +517,7 @@ |
4455 | } catch (NumberFormatException ignored) { |
4456 | double asDouble = Double.parseDouble(value); // don't catch this NumberFormatException |
4457 | result = (int) asDouble; |
4458 | - if ((double) result != asDouble) { |
4459 | + if (result != asDouble) { |
4460 | throw new NumberFormatException(value); |
4461 | } |
4462 | } |
4463 | |
4464 | === modified file 'NarauCupcake/src/org/vono/narau/utils/Language.java' |
4465 | --- NarauCupcake/src/org/vono/narau/utils/Language.java 2012-12-16 19:16:57 +0000 |
4466 | +++ NarauCupcake/src/org/vono/narau/utils/Language.java 2012-12-18 18:47:22 +0000 |
4467 | @@ -148,7 +148,7 @@ |
4468 | |
4469 | @Override |
4470 | public int hashCode() { |
4471 | - return langISO3.hashCode() + displayName.hashCode(); |
4472 | + return this.langISO3.hashCode() + this.displayName.hashCode(); |
4473 | } |
4474 | |
4475 | @Override |
4476 | |
4477 | === modified file 'NarauCupcake/src/org/vono/narau/utils/StringPool.java' |
4478 | --- NarauCupcake/src/org/vono/narau/utils/StringPool.java 2012-12-15 23:46:16 +0000 |
4479 | +++ NarauCupcake/src/org/vono/narau/utils/StringPool.java 2012-12-18 18:47:22 +0000 |
4480 | @@ -52,15 +52,15 @@ |
4481 | // Pick a bucket using Doug Lea's supplemental secondaryHash function (from HashMap) |
4482 | hashCode ^= (hashCode >>> 20) ^ (hashCode >>> 12); |
4483 | hashCode ^= (hashCode >>> 7) ^ (hashCode >>> 4); |
4484 | - int index = hashCode & (pool.length - 1); |
4485 | + int index = hashCode & (this.pool.length - 1); |
4486 | |
4487 | - String pooled = pool[index]; |
4488 | + String pooled = this.pool[index]; |
4489 | if (pooled != null && contentEquals(pooled, array, start, length)) { |
4490 | return pooled; |
4491 | } |
4492 | |
4493 | String result = new String(array, start, length); |
4494 | - pool[index] = result; |
4495 | + this.pool[index] = result; |
4496 | return result; |
4497 | } |
4498 | } |
4499 | \ No newline at end of file |
4500 | |
4501 | === modified file 'NarauDBInfo/narau_db_infos.txt' |
4502 | --- NarauDBInfo/narau_db_infos.txt 2012-12-16 22:11:21 +0000 |
4503 | +++ NarauDBInfo/narau_db_infos.txt 2012-12-18 18:47:22 +0000 |
4504 | @@ -31,3 +31,17 @@ |
4505 | kanjis_por-4.db 1355688088862 115712 58587 e865471eadd478577ce385ff4b89e3b9 https://launchpad.net/narau/fdroid/0.8/+download/kanjis_por-4.db.gz https://www.dropbox.com/s/q4zv2qxeo4bophy/kanjis_por-4.db.gz?dl=1 |
4506 | kanjis_spa-4.db 1355688089443 145408 72862 476b2f90535fd6954af4a8f25c8a9fde https://launchpad.net/narau/fdroid/0.8/+download/kanjis_spa-4.db.gz https://www.dropbox.com/s/jd0ue7bqtxcevki/kanjis_spa-4.db.gz?dl=1 |
4507 | |
4508 | +NarauVersionCode:6 |
4509 | +dict_deu-2.db 1355688597003 6544384 3170013 ca1a860990e4d5e4a7b78964a9d205a4 https://launchpad.net/narau/fdroid/0.8/+download/dict_deu-2.db.gz https://www.dropbox.com/s/v22joenidr6bd59/dict_deu-2.db.gz?dl=1 |
4510 | +dict_eng-2.db 1355688592508 10451968 4854830 5d7e27aa7f426c6f2c21f0f4f2db26fd https://launchpad.net/narau/fdroid/0.8/+download/dict_eng-2.db.gz https://www.dropbox.com/s/9foba5756ps8raf/dict_eng-2.db.gz?dl=1 |
4511 | +dict_fra-2.db 1355688600044 814080 403549 b8d9ebf3bbc6f9e7517f9b8477c2cefa https://launchpad.net/narau/fdroid/0.8/+download/dict_fra-2.db.gz https://www.dropbox.com/s/v4yjj2eo68kn3cw/dict_fra-2.db.gz?dl=1 |
4512 | +dict_jpn-2.db 1355688577773 22592512 9519117 64af59e3fa38d99b6260dfe46a6b4e51 https://launchpad.net/narau/fdroid/0.8/+download/dict_jpn-2.db.gz https://www.dropbox.com/s/8gev58w9r5fvy7v/dict_jpn-2.db.gz?dl=1 |
4513 | +dict_nld-2.db 1355688601719 2788352 1248072 e8ad3e36e7ab2bbf6bd202f868b6e06a https://launchpad.net/narau/fdroid/0.8/+download/dict_nld-2.db.gz https://www.dropbox.com/s/528i4es954f5syx/dict_nld-2.db.gz?dl=1 |
4514 | +dict_rus-2.db 1355688599474 408576 176448 b443dd4a241d6d55beee0e78e12378d1 https://launchpad.net/narau/fdroid/0.8/+download/dict_rus-2.db.gz https://www.dropbox.com/s/e9gccwvbhp9bmzs/dict_rus-2.db.gz?dl=1 |
4515 | +dict_spa-2.db 1355688600739 1448960 701111 807f21760137c67b180b588c3986a007 https://launchpad.net/narau/fdroid/0.8/+download/dict_spa-2.db.gz https://www.dropbox.com/s/tskw193dtotyxx6/dict_spa-2.db.gz?dl=1 |
4516 | +kanjis_eng-4.db 1355688088518 478208 247886 9b76634a3cd8b4a2f69b6c88190e0af2 https://launchpad.net/narau/fdroid/0.8/+download/kanjis_eng-4.db.gz https://www.dropbox.com/s/7vbc1rgzxktxiub/kanjis_eng-4.db.gz?dl=1 |
4517 | +kanjis_fra-4.db 1355688089141 129024 65118 70b513bf3ff61309edbe2e6e4b357081 https://launchpad.net/narau/fdroid/0.8/+download/kanjis_fra-4.db.gz https://www.dropbox.com/s/u07xrlludpfjxl4/kanjis_fra-4.db.gz?dl=1 |
4518 | +kanjis_jpn-4.db 1355688087507 13461504 5558501 a5d277bc30f5413f4969a0870dc7f5b0 https://launchpad.net/narau/fdroid/0.8/+download/kanjis_jpn-4.db.gz https://www.dropbox.com/s/qxx2ulk99ez9mwb/kanjis_jpn-4.db.gz?dl=1 |
4519 | +kanjis_por-4.db 1355688088862 115712 58587 e865471eadd478577ce385ff4b89e3b9 https://launchpad.net/narau/fdroid/0.8/+download/kanjis_por-4.db.gz https://www.dropbox.com/s/q4zv2qxeo4bophy/kanjis_por-4.db.gz?dl=1 |
4520 | +kanjis_spa-4.db 1355688089443 145408 72862 476b2f90535fd6954af4a8f25c8a9fde https://launchpad.net/narau/fdroid/0.8/+download/kanjis_spa-4.db.gz https://www.dropbox.com/s/jd0ue7bqtxcevki/kanjis_spa-4.db.gz?dl=1 |
4521 | + |