MainActivity.java에는
TextView textView;
public void getDT() {
Calendar cal = Calendar.getInstance();
int y = 0, m = 0, d = 0, h = 0, mi = 0, s = 0;
y = cal.get(Calendar.YEAR);
m = cal.get(Calendar.MONTH) + 1;
d = cal.get(Calendar.DAY_OF_MONTH);
h = cal.get(Calendar.HOUR);
mi = cal.get(Calendar.MINUTE);
s = cal.get(Calendar.SECOND);
textView.setText(y + "/" + m + "/" + d + " " + h + ":" + mi + ":" + s);
}
이라고 작성했고
strings.xml에 뭐라고 작성해야 연결될까요?
<string name="textView">여기에 뭐라고 작성해야 할까요..?</string>