Gravity yOffset not working
ericntd opened this issue · 0 comments
ericntd commented
Strangely, it works for normal toast!
My code:
SuperActivityToast toast = (SuperActivityToast) SuperActivityToast.create(getActivity(), new Style(), Style.TYPE_BUTTON)
.setButtonText("Dismiss")
.setButtonIconResource(R.drawable.ic_close)
.setOnButtonClickListener("good_tag_name", null, onButtonClickListener)
.setProgressBarColor(Color.WHITE)
.setText(errorMessage)
.setDuration(10000)
.setFrame(Style.FRAME_LOLLIPOP)
.setColor(PaletteUtils.getSolidColor(PaletteUtils.MATERIAL_PURPLE))
.setAnimations(Style.ANIMATIONS_POP);
int yOffset = 150;
toast.setGravity(Gravity.TOP, 0, yOffset);
toast.show();