Add language selected by engine display to Test voice activity
This commit is contained in:
parent
95cc2f82ca
commit
02bec66816
1 changed files with 4 additions and 2 deletions
|
@ -109,7 +109,7 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
|
||||||
bld.setSingleChoiceItems(entrieValues, selected, new DialogInterface.OnClickListener() {
|
bld.setSingleChoiceItems(entrieValues, selected, new DialogInterface.OnClickListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onClick(DialogInterface dialog, int which) {
|
public void onClick(DialogInterface dialog, final int which) {
|
||||||
final OsmandApplication app = (OsmandApplication) getApplication();
|
final OsmandApplication app = (OsmandApplication) getApplication();
|
||||||
getSupportActionBar().setTitle(app.getString(R.string.test_voice_prompts) + " (" + entrieValues[which] + ")");
|
getSupportActionBar().setTitle(app.getString(R.string.test_voice_prompts) + " (" + entrieValues[which] + ")");
|
||||||
app.getSettings().VOICE_PROVIDER.set(entrieValues[which]);
|
app.getSettings().VOICE_PROVIDER.set(entrieValues[which]);
|
||||||
|
@ -121,8 +121,10 @@ public class TestVoiceActivity extends OsmandActionBarActivity {
|
||||||
if (p == null) {
|
if (p == null) {
|
||||||
Toast.makeText(TestVoiceActivity.this, "Voice player not initialized", Toast.LENGTH_SHORT).show();
|
Toast.makeText(TestVoiceActivity.this, "Voice player not initialized", Toast.LENGTH_SHORT).show();
|
||||||
} else {
|
} else {
|
||||||
|
//Check which voice was set
|
||||||
|
getSupportActionBar().setTitle(app.getString(R.string.test_voice_prompts) + " (" + entrieValues[which] + ", " + p.getLanguage() + ")");
|
||||||
addButtons(ll, p);
|
addButtons(ll, p);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, true, true);
|
}, true, true);
|
||||||
dialog.dismiss();
|
dialog.dismiss();
|
||||||
|
|
Loading…
Reference in a new issue