diff --git a/app/src/main/java/com/kiwilss/lpopup/jtest/JavaTestActivity.java b/app/src/main/java/com/kiwilss/lpopup/jtest/JavaTestActivity.java index fb750c8..c7cf317 100644 --- a/app/src/main/java/com/kiwilss/lpopup/jtest/JavaTestActivity.java +++ b/app/src/main/java/com/kiwilss/lpopup/jtest/JavaTestActivity.java @@ -41,6 +41,7 @@ public void onClick(View view) { public void onClick(View view) { new Xpopup.Builder(JavaTestActivity.this,R.layout.pw_menu) + .isMask(false) .build() .showAsDropDown(btnMenu); diff --git a/lpopup/src/main/java/com/kiwilss/lpopup/x/Xpopup.kt b/lpopup/src/main/java/com/kiwilss/lpopup/x/Xpopup.kt index ea31526..0d600fe 100644 --- a/lpopup/src/main/java/com/kiwilss/lpopup/x/Xpopup.kt +++ b/lpopup/src/main/java/com/kiwilss/lpopup/x/Xpopup.kt @@ -42,7 +42,7 @@ class Xpopup private constructor(val builder: Builder): EasyPopup(builder.activi * 初始化时设置 */ override fun initInterface() { - mContext = builder.activity + } var isCancelable = true @@ -50,11 +50,13 @@ class Xpopup private constructor(val builder: Builder): EasyPopup(builder.activi private var mContext: Context? = null override fun showBeforeOperator() { + mContext = builder.activity //设置初始参数 setIsMask(isMask) setIsTouchOutsideDimiss(isCancelable) setBackgroundAlpha(alpha) } + fun setText(@IdRes viewId: Int, text: String) : Xpopup{ val view = getView(viewId) if (view != null){