private
Toast toast =
null
;
// 토스트 전용 메서드를 만든다
void
toastShow(String message) {
// 토스트 메서드
if
(toast ==
) {
toast = Toast.makeText(
this
, message, Toast.LENGTH_SHORT);
}
else
{
toast.setText(message);
toast.show();
//사용할때
toastShow(
"말할 메시지"
);
Close the view if it's showing, or don't show it if it isn't showing yet. You do not normally have to call this. Normally view will disappear on its own after the appropriate duration.