I am using @MrEngineer13's SnackBar implementation and was wondering how to capture 2 separate "ActionClick" events - depending on when the actionclick event occurs, I need to do different things.
The builder looks like this -
new SnackBar.Builder(this)
.withOnClickListener(this)
.withMessage("This library is awesome!") // OR
.withMessageId(messageId)
.withTypeFace(myAwesomeTypeFace)
.withActionMessage("Action") // OR
.withActionMessageId(actionMsgId)
.withTextColorId(textColorId)
.withBackGroundColorId(bgColorId)
.withVisibilityChangeListener(this)
.withStyle(style)
.withDuration(duration)
.show();`
and the onMessageClick takes a "token" parameter -
@Override
public void onMessageClick(Parcelable token) {
}
What I am not able to figure out is, how to pass this "token" when the click happens.