[Done] Switchmobile only works when you tap on it, not when you slide

Found an issue in SpiderBasic ? Please report it here !
grapa
Posts: 2
Joined: Tue Oct 15, 2024 7:26 pm

[Done] Switchmobile only works when you tap on it, not when you slide

Post by grapa »

If you slide the switch, as example on WebView left or in Android app left or right, it generates no MobileEvents().
It works only when you tap direct on it. Maybe it is working as expected. I dont know. But then, it is difficult to get the actual real state of the SwitchMobile()

Code: Select all

  If ContainerMobile(#PB_Any, #PB_Mobile_Page, "padding:16px")
    SwitchMobile(0)
    Debug "Enabling the switch..."
    SetMobileState(0, #True)
    CloseMobileContainer()
  EndIf
  Procedure MobileEvents()
    Select EventMobile()
      Case 0
        Debug "Switch state: " + GetMobileState(0)
    EndSelect
  EndProcedure
  BindEvent(#PB_Event_Mobile, @MobileEvents())
User avatar
Caronte3D
Posts: 189
Joined: Sat Nov 23, 2019 5:21 pm
Location: Some Universe

Re: Switchmobile only works when you tap on it, not when you slide

Post by Caronte3D »

Yes, the events needs a better detection, by example, we can't detect long tap and many times the user of mobile apps do long tap (by mistake) instead of only tap and then, the operation fails (logically).
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: Switchmobile only works when you tap on it, not when you slide

Post by Fred »

@Caronte3D you seem to have some info about what to improve for the MobileUI, don't hesitate to build a TODO list and post it somewhere so I can pick some.
User avatar
Caronte3D
Posts: 189
Joined: Sat Nov 23, 2019 5:21 pm
Location: Some Universe

Re: Switchmobile only works when you tap on it, not when you slide

Post by Caronte3D »

Thanks by your interest.
I find Onsen's UI to be too limited. I would love to have a better library like shoelace.style, but I understand it's not a trivial task to change it now.
Anyway I opened a new thread on the forum to add things to a ToDo.
Fred
Site Admin
Posts: 1820
Joined: Mon Feb 24, 2014 10:51 am

Re: [Done] Switchmobile only works when you tap on it, not when you slide

Post by Fred »

Fixed.
Post Reply