Skip to content

Commit

Permalink
12-4
Browse files Browse the repository at this point in the history
  • Loading branch information
KiWiLss committed Dec 4, 2020
1 parent b0b0613 commit d93e26d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 3 additions & 1 deletion lpopup/src/main/java/com/kiwilss/lpopup/x/Xpopup.kt
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,21 @@ class Xpopup private constructor(val builder: Builder): EasyPopup(builder.activi
* 初始化时设置
*/
override fun initInterface() {
mContext = builder.activity

}

var isCancelable = true
var alpha = 0.5f
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){
Expand Down

0 comments on commit d93e26d

Please sign in to comment.