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
android clip


source to share


No one has answered this question yet

See similar questions:

2
ClipboardManager OnPrimaryClipChangedListener is called twice for each copy

or similar:

455
Just for everyone, how to properly preserve the instance state of the fragments on the stack?
293
How to get the absolute coordinates of a view
121
Difference between `initLoader` and` restartLoader` in `LoaderManager`
five
onPrimaryClipchanged () called multiple times in Android
3
How to read heart rate from Android Wear
2
Can anyone show me a simple working implementation of PagerSlidingTabStrip?
1
Android - Vpnservice DatagramChannel.open () not working
1
Android - create very large ListView based on SQL cursor
0
Send SMS to Android
0
Firestore query search does not display data in RecycleView



All Articles
Loading...
X
Show
Funny
Dev
Pics