1

In the DateTimePicker, when the App is in portuguese, the word "Confirmar" (default) doesn't fit the button in some devices. Is it possible to change it?

enter image description here

matiash
  • 54,791
  • 16
  • 125
  • 154
Jaime
  • 159
  • 2
  • 10

2 Answers2

2

Yes, you can change this text directly in the Language object (Portuguese) and it will be used on the next Build/Run. It's the translation for the GXM_button_ok literal.

For the record, the three literals are:

  • GXM_button_ok
  • GXM_Now
  • GXM_cancel
matiash
  • 54,791
  • 16
  • 125
  • 154
0

You cannot change it. The only solution to it, is that you should create a custom dialog with the date, time pickers and buttons, and adjust the buttons in it properly. Its strange that this issue exists in the native android source code!

Antrromet
  • 15,294
  • 10
  • 60
  • 75
  • In native android, you can quite easily change the text of such buttons. – njzk2 Oct 01 '14 at 16:19
  • But then you will have to build the android source code with your changes and tell people to put that changed android build on their phones right? Which I don't think is quite easy. – Antrromet Oct 01 '14 at 16:21
  • What? no! You'd simply have to access the buttons of the dialog, and change the text to whatever suits you. – njzk2 Oct 01 '14 at 16:24
  • no. There are 3 buttons here. In the example of a `DatePickerDialog`, you would simply do `dialog.getButton(DialogInterface.BUTTON_POSITIVE).setText("Whatever");`. – njzk2 Oct 01 '14 at 16:27
  • Oh got it, I totally misunderstood! Thanks a lot for the info. – Antrromet Oct 01 '14 at 16:28