Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Touch Listener Support #12

Open
GustavoCostaW opened this issue Apr 1, 2016 · 2 comments
Open

Touch Listener Support #12

GustavoCostaW opened this issue Apr 1, 2016 · 2 comments

Comments

@GustavoCostaW
Copy link

Hello, I would like to get draggable event when the my widget_chathead receive drag, checking the README I see Click Listener.

final LinearLayout iconView = (LinearLayout) inflater.inflate(R.layout.widget_chathead, null);
         iconView.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                //works fine
             }
         });

It's works! but I want get event when user drag the widget, ex:



         iconView.setOnTouchListener(new View.OnTouchListener() {
             @Override
             public boolean onTouch(View v, MotionEvent event) {
                 //not works :(
                 return false;
             }
         });

Someone can help-me? Thank you

@YoshihideSogawa
Copy link
Contributor

FloatingView is not support the touch event.
It is difficult to handle the touch event. (...because FloatingView also move)
Please send me a pull request.

Info
FloatingView's click event is here.

@zeetherocker
Copy link

@YoshihideSogawa What do you mean by "FloatingView's click event is here."
I had to edit onTouch so I directly used your library files in my project. Is there a way I can call onClickListener inside https://github.com/recruit-lifestyle/FloatingView/blob/master/library/src/main/java/jp/co/recruit_lifestyle/android/floatingview/FloatingView.java

I tried using "this.setOnClickListener()" inside the constructor but it didn't work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants