마스터Q&A 안드로이드는 안드로이드 개발자들의 질문과 답변을 위한 지식 커뮤니티 사이트입니다. 안드로이드펍에서 운영하고 있습니다. [사용법, 운영진]

Notification custom으로 구현을 했는데 textview의 값을 지속적으로 변경하고 싶은데.. [closed]

–1 추천
Notification custom으로 구현을 했는데 textview의 값을 지속적으로 변경하고 싶은데요

setTextViewText(R.id.TextView03, mIdx);

이렇게 넣고 mIdx만 바꾸면은 변경되 되는것이 아닌가요??

아시는분 알려주세요..
질문을 종료한 이유: 답변완료
캐드카 (970 포인트) 님이 2013년 6월 28일 질문
캐드카님이 2013년 7월 1일 closed

1개의 답변

+2 추천

public void notify (String tag, int id, Notification notification)

Added in API level 5

Post a notification to be shown in the status bar. If a notification with the same tag and id has already been posted by your application and has not yet been canceled, it will be replaced by the updated information.

Parameters
tag A string identifier for this notification. May be null.
id An identifier for this notification. The pair (tag, id) must be unique within your application.
notification A Notification object describing what to show the user. Must not be null.

 

단순히 텍스트만 바꿔주고 싶으신거라면 해당 노티에 id 와 tag값을 기억했다가

위 API를 이용해서 노티피케이션을 다시 noify() 시키시면 됩니다.

기존에 없는 노티피케이션은 상태바에 띄워주고 ,

기존에 있는 노티피케이션이라면 상태를 업데이트 시켜준다고

나와있네요

Gradler (109,780 포인트) 님이 2013년 6월 28일 답변
아~~~~~~~ 감사합니다. 잘 되네요..
...