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

@ -33,12 +33,11 @@ import android.widget.EditText;
public class RockboxKeyboardInput
{
public void kbd_input(final String text)
public void kbd_input(final String text, final String ok, final String cancel)
{
final Activity c = RockboxService.get_instance().get_activity();
c.runOnUiThread(new Runnable() {
@Override
public void run()
{
LayoutInflater inflater = LayoutInflater.from(c);
@ -50,7 +49,7 @@ public class RockboxKeyboardInput
.setView(addView)
.setIcon(R.drawable.icon)
.setCancelable(false)
.setPositiveButton(R.string.OK, new DialogInterface.OnClickListener()
.setPositiveButton(ok, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton) {
EditText input = (EditText)((Dialog)dialog)
@ -59,7 +58,7 @@ public class RockboxKeyboardInput
put_result(true, s.toString());
}
})
.setNegativeButton(R.string.Cancel, new DialogInterface.OnClickListener()
.setNegativeButton(cancel, new DialogInterface.OnClickListener()
{
public void onClick(DialogInterface dialog, int whichButton)
{