源码地址

    @OnClick({R.id.button})
    public void buttonOnClick(Button button){
        view = LayoutInflater.from(this).inflate(R.layout.layout, null, false);
        mToast = new Toast(this);
        mToast.setView(view);
        mToast.setDuration(Toast.LENGTH_SHORT);
        mToast.setGravity(Gravity.BOTTOM, 0,500);
        mToast.show();
    }

发表评论