platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java in rhodes-1.4.2 vs platform/android/Rhodes/src/com/rhomobile/rhodes/datetime/DateTimePickerScreen.java in rhodes-1.5.0
- old
+ new
@@ -1,5 +1,25 @@
+/*
+ ============================================================================
+ Author : Dmitry Moskalchuk
+ Version : 1.5
+ Copyright : Copyright (C) 2008 Rhomobile. All rights reserved.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+ ============================================================================
+ */
package com.rhomobile.rhodes.datetime;
import java.util.Date;
import com.rhomobile.rhodes.AndroidR;
@@ -16,10 +36,12 @@
public class DateTimePickerScreen extends Activity {
private static final String TAG = "DateTimePicker";
+ private static final String INTENT_EXTRA_PREFIX = DateTimePicker.INTENT_EXTRA_PREFIX;
+
private String _callback;
private Date _init;
private int _fmt;
private byte[] _opaque;
@@ -57,15 +79,15 @@
getWindow().setFlags(Rhodes.WINDOW_FLAGS, Rhodes.WINDOW_MASK);
setContentView(AndroidR.layout.datetime);
Bundle extras = this.getIntent().getExtras();
- _callback = extras.getString("callback");
- _init = new Date(extras.getLong("init")*1000);
- _fmt = extras.getInt("fmt");
- _opaque = extras.getByteArray("opaque");
+ _callback = extras.getString(INTENT_EXTRA_PREFIX + "callback");
+ _init = new Date(extras.getLong(INTENT_EXTRA_PREFIX + "init")*1000);
+ _fmt = extras.getInt(INTENT_EXTRA_PREFIX + "fmt");
+ _opaque = extras.getByteArray(INTENT_EXTRA_PREFIX + "opaque");
- this.setTitle(extras.getString("title"));
+ this.setTitle(extras.getString(INTENT_EXTRA_PREFIX + "title"));
_datePicker = (DatePicker)findViewById(AndroidR.id.datePicker);
_timePicker = (TimePicker)findViewById(AndroidR.id.timePicker);
_okButton = (Button)findViewById(AndroidR.id.okButton);
_cancelButton = (Button)findViewById(AndroidR.id.cancelButton);