我想知道有没有办法在我的应用程序中更改和自定义语音识别对话框的样式?
我用这个代码,它完成了吗?public void onReadyForSpeech(Bundle params){proccessTXT.setText("现在说吧!"); }
public void onReadyForSpeech(Bundle params) {
proccessTXT.setText("Speak now!");
}
@Override
public void onBeginningOfSpeech() {
}
@Override
public void onRmsChanged(float rmsdB) {
}
@Override
public void onBufferReceived(byte[] buffer) {
}
@Override
public void onEndOfSpeech() {
proccessTXT.setText("Waiting");
}
@Override
public void onError(int error) {
proccessTXT.setText(R.string.toast_disconnect);
}
@Override
public void onResults(Bundle results) {
match_text_dialog = new Dialog(MainActivity.this);
match_text_dialog.setContentView(R.layout.dialog_maches_flag);
match_text_dialog.setTitle(R.string.selection_list);
textlist = (ListView) match_text_dialog.findViewById(R.id.list);
matches_text = getIntent().getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1, matches_text);
textlist.setAdapter(adapter);
textlist.setOnItemClickListener(new AdapterView.OnItemClickListener() { …Run Code Online (Sandbox Code Playgroud)