|
|
@ -52,7 +52,7 @@ import android.widget.ImageView;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.LinearLayout;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import android.widget.TextView;
|
|
|
|
import android.widget.Toast;
|
|
|
|
import android.widget.Toast;
|
|
|
|
//维护 添加read
|
|
|
|
//维护_丁梓坚_朗读
|
|
|
|
//import android.support.v7.app.AppCompatActivity;
|
|
|
|
//import android.support.v7.app.AppCompatActivity;
|
|
|
|
import android.speech.tts.TextToSpeech;
|
|
|
|
import android.speech.tts.TextToSpeech;
|
|
|
|
import android.speech.tts.TextToSpeech.OnInitListener;
|
|
|
|
import android.speech.tts.TextToSpeech.OnInitListener;
|
|
|
@ -156,7 +156,7 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
private String mUserQuery;
|
|
|
|
private String mUserQuery;
|
|
|
|
private Pattern mPattern;
|
|
|
|
private Pattern mPattern;
|
|
|
|
|
|
|
|
|
|
|
|
//维护 添加Read
|
|
|
|
//维护_丁梓坚_朗读
|
|
|
|
private TextToSpeech mNoteRead;
|
|
|
|
private TextToSpeech mNoteRead;
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -170,7 +170,6 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
}
|
|
|
|
}
|
|
|
|
initResources();
|
|
|
|
initResources();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Current activity may be killed when the memory is low. Once it is killed, for another time
|
|
|
|
* 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
|
|
|
|
* user load this activity, we should restore the former state
|
|
|
@ -406,7 +405,7 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
}
|
|
|
|
}
|
|
|
|
mEditTextList = (LinearLayout) findViewById(R.id.note_edit_list);
|
|
|
|
mEditTextList = (LinearLayout) findViewById(R.id.note_edit_list);
|
|
|
|
|
|
|
|
|
|
|
|
//维护 添加Read
|
|
|
|
//维护_丁梓坚_朗读
|
|
|
|
mNoteRead = new TextToSpeech(this, new OnInitListener()
|
|
|
|
mNoteRead = new TextToSpeech(this, new OnInitListener()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -579,7 +578,7 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
case R.id.menu_delete_remind:
|
|
|
|
case R.id.menu_delete_remind:
|
|
|
|
mWorkingNote.setAlertDate(0, false);
|
|
|
|
mWorkingNote.setAlertDate(0, false);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
//维护 添加read
|
|
|
|
//维护_丁梓坚_朗读
|
|
|
|
case R.id.menu_read:
|
|
|
|
case R.id.menu_read:
|
|
|
|
noteRead();
|
|
|
|
noteRead();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
@ -589,7 +588,7 @@ public class NoteEditActivity extends AppCompatActivity implements OnClickListen
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//维护 添加read
|
|
|
|
//维护_丁梓坚_朗读
|
|
|
|
private void noteRead(){
|
|
|
|
private void noteRead(){
|
|
|
|
mNoteRead.speak(mNoteEditor.getText().toString(),TextToSpeech.QUEUE_FLUSH,null);
|
|
|
|
mNoteRead.speak(mNoteEditor.getText().toString(),TextToSpeech.QUEUE_FLUSH,null);
|
|
|
|
}
|
|
|
|
}
|
|
|
|