Skip to content

对于页面内有多个textview需要使用到该help出现的长按多个textview会出现多个helper弹框问题 #8

@xiaoting000

Description

@xiaoting000

我的解决办法: 在 helper内用个static isShowing 来标记是否已经有复制弹出pop显示, 再用一个static storedHelper存放当前显示的helper, 然后再show 和 hide方法里对标记和 对storedHelper做清理操作, 具体添加代码如下:

private static boolean isShowing = false;
private static SelectableTextHelper storedHelper;

public void hideSelectView() {
        isShowing = false;
//your code
//......
}

private void showSelectView(int x, int y) {
        if(isShowing){
            storedHelper.resetStored();
        }
// your code
//.....
}

public void resetStored(){
        resetSelectionInfo();
        hideSelectView();
        mStartHandle = null;
        mEndHandle = null;
        mOperateWindow = null;
    }

 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions