Simple Notepad Application for Android OS
修订版 | 2f933246c5596f1e937c7f36b777394f30189e01 (tree) |
---|---|
时间 | 2017-04-05 18:54:42 |
作者 | Masahiko, SAWAI <say@user...> |
Commiter | Masahiko, SAWAI |
Updated targetSdkVersion to 25(Android 7.1.1)
@@ -6,7 +6,7 @@ | ||
6 | 6 | android:versionName="1.0.13" |
7 | 7 | android:installLocation="auto" |
8 | 8 | > |
9 | - <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="23" /> | |
9 | + <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="25" /> | |
10 | 10 | |
11 | 11 | <uses-feature android:name="android.hardware.touchscreen" android:required="false" /> |
12 | 12 | <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> |
@@ -397,12 +397,12 @@ public class ViewNoteFragment extends NoteDetailFragment implements NotepadConst | ||
397 | 397 | |
398 | 398 | private void findPrevWord() |
399 | 399 | { |
400 | - if (findWordActionMode != null) | |
400 | + if (findWordActionMode != null && findWordEditText != null) | |
401 | 401 | { |
402 | 402 | String currentTargetWord = this.findWordContext.getTargetWord(); |
403 | - String newTargetWord = this.findWordEditText.getText().toString(); | |
403 | + CharSequence newTargetWord = this.findWordEditText.getText(); | |
404 | 404 | |
405 | - if (TextUtils.isEmpty(currentTargetWord) || currentTargetWord.equals(newTargetWord) == false) | |
405 | + if (TextUtils.isEmpty(currentTargetWord) || TextUtils.equals(currentTargetWord, newTargetWord) == false) | |
406 | 406 | { |
407 | 407 | findWord(); |
408 | 408 | } |
@@ -416,12 +416,12 @@ public class ViewNoteFragment extends NoteDetailFragment implements NotepadConst | ||
416 | 416 | |
417 | 417 | private void findNextWord() |
418 | 418 | { |
419 | - if (findWordActionMode != null) | |
419 | + if (findWordActionMode != null && findWordEditText != null) | |
420 | 420 | { |
421 | 421 | String currentTargetWord = this.findWordContext.getTargetWord(); |
422 | - String newTargetWord = this.findWordEditText.getText().toString(); | |
422 | + CharSequence newTargetWord = this.findWordEditText.getText(); | |
423 | 423 | |
424 | - if (TextUtils.isEmpty(currentTargetWord) || currentTargetWord.equals(newTargetWord) == false) | |
424 | + if (TextUtils.isEmpty(currentTargetWord) || TextUtils.equals(currentTargetWord, newTargetWord) == false) | |
425 | 425 | { |
426 | 426 | findWord(); |
427 | 427 | } |