From 336b09b30b3649d73d7f3b9754195630c508e372 Mon Sep 17 00:00:00 2001 From: dev <230340275@cauc.edu.cn> Date: Thu, 29 May 2025 08:31:31 +0800 Subject: [PATCH] start --- .../net/micode/notes/ui/NoteEditActivity.java | 36 +---------- .../app/src/main/res/layout/get_time.xml | 60 ------------------- 2 files changed, 1 insertion(+), 95 deletions(-) delete mode 100644 01src/XiaoMiNotes/MyApplication/app/src/main/res/layout/get_time.xml diff --git a/01src/XiaoMiNotes/MyApplication/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java b/01src/XiaoMiNotes/MyApplication/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java index c67a1bc..96a9ff8 100644 --- a/01src/XiaoMiNotes/MyApplication/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java +++ b/01src/XiaoMiNotes/MyApplication/app/src/main/java/net/micode/notes/ui/NoteEditActivity.java @@ -28,7 +28,6 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Paint; -import android.media.MediaPlayer; import android.os.Bundle; import android.preference.PreferenceManager; import android.text.Spannable; @@ -52,11 +51,6 @@ import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; -import android.widget.Button; - -import android.speech.tts.TextToSpeech; -import android.speech.tts.UtteranceProgressListener; -import java.util.Locale; import net.micode.notes.R; import net.micode.notes.data.Notes; @@ -78,7 +72,6 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; - public class NoteEditActivity extends Activity implements OnClickListener, NoteSettingChangedListener, OnTextViewChangeListener { private class HeadViewHolder { @@ -155,33 +148,12 @@ public class NoteEditActivity extends Activity implements OnClickListener, private String mUserQuery; private Pattern mPattern; - private Button readButton; - - private TextToSpeech tts;//接口 @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.note_edit); - tts = new TextToSpeech(this, new TextToSpeech.OnInitListener() {//tts初始化 - @Override - public void onInit(int status) { - if(status == TextToSpeech.SUCCESS) {//设置中文 - int result = tts.setLanguage(Locale.CHINA); - if (result != TextToSpeech.LANG_COUNTRY_AVAILABLE && result != TextToSpeech.LANG_AVAILABLE) { - Toast.makeText(NoteEditActivity.this, "正在跳转", Toast.LENGTH_SHORT).show(); - } - tts.setSpeechRate(1.0f);//速度 - tts.setPitch(1.0f);//音调 - } - } - }); - readButton=findViewById(R.id.readnote);//按钮 - readButton.setOnClickListener(new View.OnClickListener() {//点击阅读 - @Override public void onClick(View view) { - ReadNow(); - } - }); + if (savedInstanceState == null && !initActivityState(getIntent())) { finish(); return; @@ -189,12 +161,6 @@ public class NoteEditActivity extends Activity implements OnClickListener, initResources(); } - public void ReadNow(){ - ; - } - - - /** * Current activity may be killed when the memory is low. Once it is killed, for another time * user load this activity, we should restore the former state diff --git a/01src/XiaoMiNotes/MyApplication/app/src/main/res/layout/get_time.xml b/01src/XiaoMiNotes/MyApplication/app/src/main/res/layout/get_time.xml deleted file mode 100644 index 8e399f3..0000000 --- a/01src/XiaoMiNotes/MyApplication/app/src/main/res/layout/get_time.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file