Here is a very simple code segment I am running on the emulator.
It creates a new Calendar cal and reads cal.HOUR and cal.MINUTE
it then prints those values to the screen.
The emulator always reads 10 12
?
Any ideas?
Thanks,
package com.android.date;
import android.app.Activity;
import android.os.Bundle;
import java.lang.Object;
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Date;
import android.os.Bundle;
import android.widget.TextView;
public class date extends Activity {
/** Called when the activity is first created. */
Calendar cal = Calendar.getInstance();
int hour = cal.HOUR;
int minute = cal.MINUTE;
/** LOOK HERE -- tv.setText(hour + " " + minute)
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText(hour + " " + minute);
setContentView(tv);
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---