|
|
|
@ -655,28 +655,30 @@ ViewPager.OnPageChangeListener, EditNoteActivity.UpdatesChangedListener {
|
|
|
|
|
|
|
|
|
|
|
|
public void onUiThread() {
|
|
|
|
public void onUiThread() {
|
|
|
|
// prepare and set listener for voice-button
|
|
|
|
// prepare and set listener for voice-button
|
|
|
|
if (addOnService.hasPowerPack()) {
|
|
|
|
if (getActivity() != null) {
|
|
|
|
voiceAddNoteButton = (ImageButton) notesControlSet.getView().findViewById(
|
|
|
|
if (addOnService.hasPowerPack()) {
|
|
|
|
R.id.voiceAddNoteButton);
|
|
|
|
voiceAddNoteButton = (ImageButton) notesControlSet.getView().findViewById(
|
|
|
|
voiceAddNoteButton.setVisibility(View.VISIBLE);
|
|
|
|
R.id.voiceAddNoteButton);
|
|
|
|
int prompt = R.string.voice_edit_note_prompt;
|
|
|
|
voiceAddNoteButton.setVisibility(View.VISIBLE);
|
|
|
|
voiceNoteAssistant = new VoiceInputAssistant(TaskEditFragment.this,
|
|
|
|
int prompt = R.string.voice_edit_note_prompt;
|
|
|
|
voiceAddNoteButton, notesEditText, REQUEST_VOICE_RECOG);
|
|
|
|
voiceNoteAssistant = new VoiceInputAssistant(TaskEditFragment.this,
|
|
|
|
voiceNoteAssistant.setAppend(true);
|
|
|
|
voiceAddNoteButton, notesEditText, REQUEST_VOICE_RECOG);
|
|
|
|
voiceNoteAssistant.setLanguageModel(RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
|
|
|
|
voiceNoteAssistant.setAppend(true);
|
|
|
|
voiceNoteAssistant.configureMicrophoneButton(prompt);
|
|
|
|
voiceNoteAssistant.setLanguageModel(RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
|
|
|
|
}
|
|
|
|
voiceNoteAssistant.configureMicrophoneButton(prompt);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// re-read all
|
|
|
|
// re-read all
|
|
|
|
synchronized (controls) {
|
|
|
|
synchronized (controls) {
|
|
|
|
for (TaskEditControlSet controlSet : controls)
|
|
|
|
for (TaskEditControlSet controlSet : controls)
|
|
|
|
controlSet.readFromTask(model);
|
|
|
|
controlSet.readFromTask(model);
|
|
|
|
if (isNewTask) {
|
|
|
|
if (isNewTask) {
|
|
|
|
hideUntilControls.setDefaults();
|
|
|
|
hideUntilControls.setDefaults();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadMoreContainer();
|
|
|
|
loadMoreContainer();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
|