Has anyone used onPrimaryClipChanged?

Problem occurs when I use OnPrimaryClipChangedListener to change the clipboard.
he always gets twice. can anyone help me?

The code looks like this:

private OnPrimaryClipChangedListener clipListener = new OnPrimaryClipChangedListener() {
    @Override
    public void onPrimaryClipChanged() {
        Log.d("mytag", '--------->clip--------->');
    }
}

      

when i clamp i get two logs. Anyone have the same problem?

D / mytag ---------> clip --------->
D / mytag ---------> clip --------->

+3


source to share





All Articles