I have a fragment on which bottom bar fragment
is attached. On the bottom bar I have some inputs which allow me to fill with voice recognition results.
I call startActivityForResult
by
getParentFragment().startActivityForResult(descriptionEditText.getRecognizerIntent(), VOICE_RECOGNITION_REQUEST_CODE);
My onActivityResult
(calling from parent fragment):
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == VOICE_RECOGNITION_REQUEST_CODE) {
if (resultCode == RESULT_OK && null != data) {
ArrayList<String> result = data
.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
descriptionEditText.setText(result.get(0));
}
}
}
Everything seems to work good, but after the voice recognition intent is getting starting, the bottom bar hides for the moment, voice recognizer activity is active. I want to avoid it.
To be more clear, what I would like to achieve, there are some screen shots.
before clicking on voice input
after clicking on voice input