Android Question DisplayValue xChart and AsViewPager

angel_

Well-Known Member
Licensed User
Longtime User
I have problems showing the values when I touch on the graph, it does not allow me to drag the touch and see the values on the chart, I have to click on different places and sometimes it does not show the value.

It happens to me with xChart and AsViewPager (B4A and B4i), and the same error with iTabStrip, with TabStripViewPager it works fine.

Any idea how to fix it?
 

Attachments

  • AS View Pager Example_xchart.zip
    23.7 KB · Views: 44

klaus

Expert
Licensed User
Longtime User
Sorry, but i have never used AsViewPager nor iTabStrip.
Therefore it is difficult for me to help you.
Maybe the Touch event is consumed by AsViewPager or iTabStrip ?
Can you post a small project showing the problem ?
 
Upvote 0

angel_

Well-Known Member
Licensed User
Longtime User
Thanks Klaus, in the first thread there is an attached file, I also think it is a conflict between events but I can't think of how to fix it.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Attached you find angels project.
I added the xChart.bas module instead of using the xChart.b4xlib library.
I added Log(Action) at the beginning of the xpnlCursor_Touch routine to see what happens.
When moving with the finger you see at the beginning 0 DOWN and several 2 MOVE and a 3, i do not know what this is and no further action is transmitted, the UP action is not transmitted.
If you touch without moving you get the 0 DOWN some 2 MOVE and the 1 UP, which is normal.
Then, when moving with the finger, the chart view moves also, i do not know how Android handles this.
 

Attachments

  • AS View Pager Example_xchart new.zip
    70.8 KB · Views: 38
Upvote 0

angel_

Well-Known Member
Licensed User
Longtime User
I have found a possible alternative but it is not optimal, I am attaching the file in case someone suggests a better solution
 

Attachments

  • AS View Pager Example2.zip
    70.8 KB · Views: 44
Upvote 0
Top