use localized strings at dialogs

This commit is contained in:
tibbi 2016-07-24 18:12:00 +02:00
parent c3fb05f7d0
commit 1a98db66ff
3 changed files with 5 additions and 5 deletions

View file

@ -124,8 +124,8 @@ public class DayActivity extends SimpleActivity
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, dateTime.getDayOfMonth(), null);
alertDialog.setView(view);
alertDialog.setNegativeButton("Cancel", null);
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
alertDialog.setNegativeButton(android.R.string.cancel, null);
alertDialog.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
final int month = datePicker.getMonth() + 1;
final int year = datePicker.getYear();

View file

@ -187,8 +187,8 @@ public class MainActivity extends SimpleActivity implements Calendar {
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, 1, null);
alertDialog.setView(view);
alertDialog.setNegativeButton("Cancel", null);
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
alertDialog.setNegativeButton(android.R.string.cancel, null);
alertDialog.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int id) {
final int month = datePicker.getMonth() + 1;
final int year = datePicker.getYear();

View file

@ -53,7 +53,7 @@
android:fontFamily="sans-serif-light"
android:paddingLeft="@dimen/activity_margin"
android:paddingRight="@dimen/activity_margin"
android:text="OK"
android:text="@android:string/ok"
android:textColor="@android:color/white"
android:textSize="@dimen/config_text_size"/>
</RelativeLayout>