Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drag & drop object #30

Open
rkarimi88 opened this issue Oct 31, 2018 · 0 comments
Open

drag & drop object #30

rkarimi88 opened this issue Oct 31, 2018 · 0 comments

Comments

@rkarimi88
Copy link

rkarimi88 commented Oct 31, 2018

Hello.
I have imported your lib in my app and am using its 'statik' feature for drag & drop ImageViews. It is a great library, thank you :)

My question is:
Is there a way to detect where user drops the object?

Edit:
When I use this code to detect user's touch release, the object (ball) doesn't move anymore:

ball.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View v, MotionEvent event) {
                if(event.getAction() == MotionEvent.ACTION_UP)
                    Toast.makeText(MainActivity.this, "Dropped.", Toast.LENGTH_SHORT).show();
                return true;
            }
        });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant