안드로이드 개발 질문/답변
(글 수 45,052)
if(l_d_day != null) {
Log.i(DEBUG_TAG , "curItem.dDay = " + curItem.dDay );
if( curItem.dDay > 0 ){
l_d_day.setText("D -" + curItem.dDay );
} else if( curItem.dDay < 0 ) {
l_d_day.setText("D +" + Math.abs(curItem.dDay) );
} else {
l_d_day.setTextColor(0xFFFF0000); /* red */
l_d_day.setText("D Day");
Log.i("DAY","day");
nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
PendingIntent intent = PendingIntent.getActivity(
daybyday.this, 0,
new Intent(daybyday.this, daybyday.class), 0);
String ticker = "D-DAY";
String title = l_Title.getText().toString();
String text = "D-day";
// Create Notification Object
Notification notification =
new Notification(android.R.drawable.ic_input_add,
ticker, System.currentTimeMillis());
notification.setLatestEventInfo(daybyday.this,
title, text, intent);
nm.notify(1234, notification);
}
}if , else에서 조건에 1< curItem.dDay < 3 이런식으로 하니 오류가 나네요
<, > 을 하나만 쓰면 괜찮은데 2개쓰니까 오류가 납니다.
이유와 해결방안좀 알려주세요... ㅠㅜ




3개의 조건을 하실려면 if ( curItem.dDay > 1 ) {
} else if(curItem.dDay <3) {
}
이런식으로 분기태우셔야할겁니다.