calendar.my コードを使用して現在の日付と時刻を表示したい
LinearLayout lview=new LinearLayout(this);
myText=new TextView(this);
strText=new TextView(this);
Calendar c=Calendar.getInstance();
int seconds=c.get(Calendar.SECOND);
myText.setText("Your current seconds are:");
strText.setText(seconds);
lview.addView(strText);
lview.addView(myText);
setContentView(lview);
残念ながら、日付を表示せずにアプリが動作しなくなったことを示しています..