안녕 하세요...
AlertDialog 관련 해서 문의 드립니다
아래 코드를 실행 해보면 처음 얻은 "초" 값만 계속 나타나고
그 이후에는 변화가 전혀없습니다
무슨 원인인지 모르겠습니다...
public class onAir extends onAirTracker {
private static String secText ;
.....
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
g.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView parent, View v, int position, long id) {
Calendar rightnow = Calendar.getInstance();
secText = Integer.toString(rightnow.get(Calendar.SECOND));; <---- 클릭 이벤트 발생시점의 시간(초)를 대입
showDialog(DIALOG_YES_NO_LONG_MESSAGE);
.....
}
});
protected Dialog onCreateDialog(int id) {
switch (id) {
case DIALOG_YES_NO_LONG_MESSAGE:
return new AlertDialog.Builder(onAir.this)
.setIcon(R.drawable.alert_dialog_icon)
.setTitle(R.string.alert_dialog_two_buttons_msg)
.setMessage(secText ) <----- 처음 얻은 초값만 나타나고 그이후엔 안바뀜?????????????????