````
class TestWindow constructor(var ctx: Context, var anchor: View) : AbsQMBasePopup(ctx) {
    override fun onShowEnd() {
        dimBehind(0.5f)
    }

    override fun config(): WindowConfig {
        return AbsQMBasePopup.WindowConfig().apply {
            mContentView = LayoutInflater.from(ctx).inflate(R.layout.qm_alert_content, null)
            mAnchorView = anchor
            mWindowWidth = getScreenWidth(ctx) - ctx.dpTopx(30.0f)
            mGravity = Gravity.CENTER
        }
    }

    override fun onShowBegin(contentView: View): Point {
        return Point(0, 0)
    }


}

````
`  显示   TestWindow(this, anchorView).build().show()
`