use localized strings at dialogs
This commit is contained in:
parent
c3fb05f7d0
commit
1a98db66ff
|
@ -124,8 +124,8 @@ public class DayActivity extends SimpleActivity
|
||||||
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, dateTime.getDayOfMonth(), null);
|
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, dateTime.getDayOfMonth(), null);
|
||||||
|
|
||||||
alertDialog.setView(view);
|
alertDialog.setView(view);
|
||||||
alertDialog.setNegativeButton("Cancel", null);
|
alertDialog.setNegativeButton(android.R.string.cancel, null);
|
||||||
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
alertDialog.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
final int month = datePicker.getMonth() + 1;
|
final int month = datePicker.getMonth() + 1;
|
||||||
final int year = datePicker.getYear();
|
final int year = datePicker.getYear();
|
||||||
|
|
|
@ -187,8 +187,8 @@ public class MainActivity extends SimpleActivity implements Calendar {
|
||||||
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, 1, null);
|
datePicker.init(dateTime.getYear(), dateTime.getMonthOfYear() - 1, 1, null);
|
||||||
|
|
||||||
alertDialog.setView(view);
|
alertDialog.setView(view);
|
||||||
alertDialog.setNegativeButton("Cancel", null);
|
alertDialog.setNegativeButton(android.R.string.cancel, null);
|
||||||
alertDialog.setPositiveButton("OK", new DialogInterface.OnClickListener() {
|
alertDialog.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
||||||
public void onClick(DialogInterface dialog, int id) {
|
public void onClick(DialogInterface dialog, int id) {
|
||||||
final int month = datePicker.getMonth() + 1;
|
final int month = datePicker.getMonth() + 1;
|
||||||
final int year = datePicker.getYear();
|
final int year = datePicker.getYear();
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
android:fontFamily="sans-serif-light"
|
android:fontFamily="sans-serif-light"
|
||||||
android:paddingLeft="@dimen/activity_margin"
|
android:paddingLeft="@dimen/activity_margin"
|
||||||
android:paddingRight="@dimen/activity_margin"
|
android:paddingRight="@dimen/activity_margin"
|
||||||
android:text="OK"
|
android:text="@android:string/ok"
|
||||||
android:textColor="@android:color/white"
|
android:textColor="@android:color/white"
|
||||||
android:textSize="@dimen/config_text_size"/>
|
android:textSize="@dimen/config_text_size"/>
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
Loading…
Reference in New Issue