You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error message in the Logcat.
requestLayout() improperly called by android.widget.RelativeLayout{4046e3c I........ ......ID 0,168-1050,1521 #7f0d01a3 app:id/search_suggestions_section} during layout: running second layout pass
mSearchView.setOnMenuItemClickListener(new FloatingSearchView.OnMenuItemClickListener() {
@Override
public void onActionMenuItemSelected(MenuItem item) {
if (item.getItemId() == R.id.action_voice) {
Intent intent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
startActivityForResult(intent, SPEECH_REQUEST_CODE);
}
}
});
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == SPEECH_REQUEST_CODE && resultCode == RESULT_OK) {
List<String> results = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
final String spokenText = results.get(0);
getActivity().runOnUiThread(new Runnable() {
public void run() {
mSearchView.setSearchText(spokenText);
}
});
}
}
The text was updated successfully, but these errors were encountered:
wendabizcon
changed the title
Can't settext on searchview using voice recognize speech
Can't settext on searchview after using voice recognize speech
Jun 6, 2017
Error message in the Logcat.
requestLayout() improperly called by android.widget.RelativeLayout{4046e3c I........ ......ID 0,168-1050,1521 #7f0d01a3 app:id/search_suggestions_section} during layout: running second layout pass
The text was updated successfully, but these errors were encountered: