Skip to content

drag & drop object #30

Description

@rkarimi88

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;
            }
        });

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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