Code Monkey home page Code Monkey logo

Comments (7)

Malachiasz avatar Malachiasz commented on June 28, 2024

I am supporting clicking on part of item, to do that I pass clickListener in adapter constructor and attach it in getView to proper view parts. It works.

from horizontalvariablelistview.

klommenz avatar klommenz commented on June 28, 2024

To me it doesn't. I have used it precisely the same way as in the example, with the click listener attached to the HVLV, but nothing happens. The same with the selection listener.

Actually, there are two separate problems i am suffering from:

  1. Clicks are catched on the items of the horizontal view are not caught at all. (as i already described, and which i think is identical to the issue #17)
  2. The horizontal views are in a vertical ListView. In addition to the HVLV not catching any click events, it also doesnt allow vertical scrolling when the drag starts in an area in the HVLV. If i drag from other elements outside the HVLV, the vertical scroll works properly.

Tried to change the ListView to a custom one, overriding onInterceptTouchEvent, but it doesn't seem to work the magic.

Any ideas anyone?

from horizontalvariablelistview.

Malachiasz avatar Malachiasz commented on June 28, 2024

I don't understand sentence "Clicks are catched on the items of the horizontal view are not caught at all."

" The horizontal views are in a vertical ListView. " - then take them out of this ListView and see if it helps.

"I have used it precisely the same way as in the example" - but I haven't. I told you that I used something like:

    HorizontalVariableListView hvlvList = (HorizontalVariableListView) view.findViewById( R.id.hvlvList );
    HorizontalAdapter listAdapter = new HorizontalAdapter(activity, list, clickListener, favoriteClickListener, this);
    hvlvList.setLayoutParams(params);
    hvlvList.setOverScrollMode( HorizontalVariableListView.OVER_SCROLL_ALWAYS );
    hvlvList.setEdgeGravityY( Gravity.CENTER );
    hvlvList.setAdapter( listAdapter );

And example has worked for me, so maybe start modifying example and see which steps makes click handler not to work. - typical debugging approach

from horizontalvariablelistview.

klommenz avatar klommenz commented on June 28, 2024

Malachiasz,

I've changed a bit the listeners inside the view, and now everything works perfectly. What i was trying to say was that i suspected that since click events were not caught by the view listeners, the entire touch event management of the horizontal list went off. Now that the views inside the horizontal list are catching these click events, it seems that all other touch events (drag, etc) are working properly.

Thanks so much for your help. Appreciate it.

K

from horizontalvariablelistview.

Bigli avatar Bigli commented on June 28, 2024

I have the same problem, I can not find a solution, please help.

from horizontalvariablelistview.

klommenz avatar klommenz commented on June 28, 2024

Bigli, did you find a solution for your problem?

from horizontalvariablelistview.

Bigli avatar Bigli commented on June 28, 2024

klommenz, no.

from horizontalvariablelistview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.