diff --git a/src/.gradle/5.4.1/executionHistory/executionHistory.bin b/src/.gradle/5.4.1/executionHistory/executionHistory.bin index f5fccb3..7e02088 100644 Binary files a/src/.gradle/5.4.1/executionHistory/executionHistory.bin and b/src/.gradle/5.4.1/executionHistory/executionHistory.bin differ diff --git a/src/.gradle/5.4.1/executionHistory/executionHistory.lock b/src/.gradle/5.4.1/executionHistory/executionHistory.lock index d5f5301..4ae7383 100644 Binary files a/src/.gradle/5.4.1/executionHistory/executionHistory.lock and b/src/.gradle/5.4.1/executionHistory/executionHistory.lock differ diff --git a/src/.gradle/5.4.1/fileHashes/fileHashes.bin b/src/.gradle/5.4.1/fileHashes/fileHashes.bin index 2d17d89..197edd5 100644 Binary files a/src/.gradle/5.4.1/fileHashes/fileHashes.bin and b/src/.gradle/5.4.1/fileHashes/fileHashes.bin differ diff --git a/src/.gradle/5.4.1/fileHashes/fileHashes.lock b/src/.gradle/5.4.1/fileHashes/fileHashes.lock index 9781d7c..81bf460 100644 Binary files a/src/.gradle/5.4.1/fileHashes/fileHashes.lock and b/src/.gradle/5.4.1/fileHashes/fileHashes.lock differ diff --git a/src/.gradle/5.4.1/javaCompile/classAnalysis.bin b/src/.gradle/5.4.1/javaCompile/classAnalysis.bin index 75ce97d..d247ab0 100644 Binary files a/src/.gradle/5.4.1/javaCompile/classAnalysis.bin and b/src/.gradle/5.4.1/javaCompile/classAnalysis.bin differ diff --git a/src/.gradle/5.4.1/javaCompile/javaCompile.lock b/src/.gradle/5.4.1/javaCompile/javaCompile.lock index 881b3bf..bd3db0b 100644 Binary files a/src/.gradle/5.4.1/javaCompile/javaCompile.lock and b/src/.gradle/5.4.1/javaCompile/javaCompile.lock differ diff --git a/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 4001442..c034219 100644 Binary files a/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/src/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/src/app/build/intermediates/dex/debug/mergeDexDebug/out/classes.dex b/src/app/build/intermediates/dex/debug/mergeDexDebug/out/classes.dex index 3c5a754..576accc 100644 Binary files a/src/app/build/intermediates/dex/debug/mergeDexDebug/out/classes.dex and b/src/app/build/intermediates/dex/debug/mergeDexDebug/out/classes.dex differ diff --git a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt index e25400a..42652d4 100644 --- a/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt +++ b/src/app/build/intermediates/incremental/packageDebug/tmp/debug/dex-renamer-state.txt @@ -1,4 +1,4 @@ -#Thu Oct 17 22:05:25 CST 2019 +#Fri Oct 18 00:06:03 CST 2019 base.0=C\:\\Project\\minote\\src\\app\\build\\intermediates\\dex\\debug\\mergeDexDebug\\out\\classes.dex path.0=classes.dex renamed.0=classes.dex diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$1.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$1.class index ab1bffc..23e3bce 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$1.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$1.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$2.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$2.class index 3635bb1..6f7aee5 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$2.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$2.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$3.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$3.class index 4a02547..c49754f 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$3.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity$3.class differ diff --git a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity.class b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity.class index 7680007..bcd194f 100644 Binary files a/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity.class and b/src/app/build/intermediates/javac/debug/classes/net/micode/notes/ui/NoteEditActivity.class differ diff --git a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$1.dex b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$1.dex index b6e9366..b38de1f 100644 Binary files a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$1.dex and b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$1.dex differ diff --git a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$2.dex b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$2.dex index e4c5969..c85078a 100644 Binary files a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$2.dex and b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$2.dex differ diff --git a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$3.dex b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$3.dex index 253d20b..26ac155 100644 Binary files a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$3.dex and b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity$3.dex differ diff --git a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity.dex b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity.dex index 3e07453..58c923f 100644 Binary files a/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity.dex and b/src/app/build/intermediates/transforms/dexBuilder/debug/0/net/micode/notes/ui/NoteEditActivity.dex differ diff --git a/src/app/build/outputs/apk/debug/app-debug.apk b/src/app/build/outputs/apk/debug/app-debug.apk index 6832a0c..f475852 100644 Binary files a/src/app/build/outputs/apk/debug/app-debug.apk and b/src/app/build/outputs/apk/debug/app-debug.apk differ diff --git a/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java b/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java index 8d094ed..a8bc334 100644 --- a/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java +++ b/src/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java @@ -30,9 +30,11 @@ import android.content.SharedPreferences; import android.graphics.Paint; import android.os.Bundle; import android.preference.PreferenceManager; +import android.text.Editable; import android.text.Spannable; import android.text.SpannableString; import android.text.TextUtils; +import android.text.TextWatcher; import android.text.format.DateUtils; import android.text.style.BackgroundColorSpan; import android.util.Log; @@ -161,6 +163,8 @@ public class NoteEditActivity extends Activity implements OnClickListener, //保存便签字符数量 private int mNoteLength; + private String mFormateDataTime; + //记录默认字体大小 private static final String PREFERENCE_FONT_SIZE = "pref_font_size"; @@ -297,7 +301,6 @@ public class NoteEditActivity extends Activity implements OnClickListener, } - @Override protected void onResume() { super.onResume(); @@ -326,10 +329,12 @@ public class NoteEditActivity extends Activity implements OnClickListener, //获取已保存便签的字符数 mNoteLength = mNoteEditor.getText().toString().length(); - mNoteHeaderHolder.tvModified.setText(DateUtils.formatDateTime(this, + mFormateDataTime = DateUtils.formatDateTime(this, mWorkingNote.getModifiedDate(), DateUtils.FORMAT_SHOW_DATE | DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_TIME - | DateUtils.FORMAT_SHOW_YEAR) + | DateUtils.FORMAT_SHOW_YEAR); + + mNoteHeaderHolder.tvModified.setText(mFormateDataTime + space_after_title_time +getResources().getString(R.string.note_length) + " : " + mNoteLength); @@ -416,7 +421,34 @@ public class NoteEditActivity extends Activity implements OnClickListener, mNoteHeaderHolder.tvAlertDate = (TextView) findViewById(R.id.tv_alert_date); mNoteHeaderHolder.ibSetBgColor = (ImageView) findViewById(R.id.btn_set_bg_color); mNoteHeaderHolder.ibSetBgColor.setOnClickListener(this); + mFormateDataTime = DateUtils.formatDateTime(this, + mWorkingNote.getModifiedDate(), DateUtils.FORMAT_SHOW_DATE + | DateUtils.FORMAT_NUMERIC_DATE | DateUtils.FORMAT_SHOW_TIME + | DateUtils.FORMAT_SHOW_YEAR); mNoteEditor = (EditText) findViewById(R.id.note_edit_view); + mNoteEditor.addTextChangedListener(new TextWatcher() { + @Override + public void beforeTextChanged(CharSequence s, int start, int count, int after) { + + } + + @Override + public void onTextChanged(CharSequence s, int start, int before, int count) { + if(count == 0){ + mNoteLength -= before; + }else{ + mNoteLength += count; + } + mNoteHeaderHolder.tvModified.setText(mFormateDataTime + + space_after_title_time +getResources().getString(R.string.note_length) + " : " + + mNoteLength); + } + + @Override + public void afterTextChanged(Editable s) { + + } + }); mNoteLength = mNoteEditor.getText().toString().length(); mNoteEditorPanel = findViewById(R.id.sv_note_edit); mNoteBgColorSelector = findViewById(R.id.note_bg_color_selector);