1
0
Fork 0
forked from len0rd/rockbox

Android: Use our translations for the yes/no/ok/cancel buttons in the yesno and keyboard dialog.

Second part of FS#11708.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28515 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Thomas Martitz 2010-11-06 01:40:24 +00:00
parent 93640fc228
commit 739d76cfda
4 changed files with 31 additions and 15 deletions

View file

@ -28,12 +28,11 @@ import android.content.DialogInterface;
public class RockboxYesno
{
@SuppressWarnings("unused")
private void yesno_display(final String text)
private void yesno_display(final String text, final String yes, final String no)
{
final Activity c = RockboxService.get_instance().get_activity();
c.runOnUiThread(new Runnable() {
@Override
public void run()
{
new AlertDialog.Builder(c)
@ -41,14 +40,14 @@ public class RockboxYesno
.setIcon(R.drawable.icon)
.setCancelable(false)
.setMessage(text)
.setPositiveButton(R.string.Yes, new DialogInterface.OnClickListener()
.setPositiveButton(yes, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{
put_result(true);
}
})
.setNegativeButton(R.string.No, new DialogInterface.OnClickListener()
.setNegativeButton(no, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{