Any hints for touch screen supportin script?
#1
Are there any docs/hints/examples for writing a script WindowXML that is touch screen friendly? I have requests to add media controls etc for people using touch screens, but i don't really know how this works (I haven't even used any buttons etc yet!).

Are there different events for press vs hold, for instance (so I can have buttons with multiple behaviours)?

Is it all just handled like normal skin buttons, or is there something different to it? And if so - do python addons have access to these differences?

My guess is to bung the controls into my skin xml file, and then basically look for event on these buttons (using the ids I set in my skin file?) in onAction? or onControl, I have seen mentioned...or do I have to add the controls via python itself?

Any tips appreciated!!
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
Afaik, Xbmc handles all the touch sensing and translates everything to most events (python can't tell the different between a touch and a mouse click
Reply
#3
Yeah I am figuring that out as I go along, although i don't have a touch device so it's a bit silly. Anyway I have the controls and events working, but I am still particularly wondering about touch vs hold events....

Oh, and generally one seems to have to overload onClick() rather than onControl()

Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#4
Buttons only accept a single click.

Lists can potentially accept 2 types of clicks, e.g. the context menu can pops up based on a hold click on android.

I suspect that you get nothing other than onClick for normal buttons. It's usually good advice to only have a button do a single thing anyway - you can't guarantee that the touch screen (or mouse) will have more than the ability to just give a single click.

Best advice is making sure everything has a button (eg have a dedicated button to close the window/dialog) and that the buttons have appropriate hitrects - you probably don't need to do anything in this regard if the buttons are large enough.

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
Yeah cool, thanks - I don't see in immediate need for a hold type action anyway, so I think I am good with the basic buttons, so far so good with those. I do maybe want to do a slider though, maybe I will jsut do + and - buttons instead Smile
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#6
(2012-09-20, 06:36)bossanova808 Wrote: Yeah I am figuring that out as I go along, although i don't have a touch device so it's a bit silly. Anyway I have the controls and events working, but I am still particularly wondering about touch vs hold events....

That's what I was getting at, xbmc/the platform handle all that at a higher level, and just pass down the translated events. For example on android, a "Hold" event is translated to a right click and passed down to the button. Touch-dragging a slider comes through as a click and drag
Reply
#7
I have a 17" eGalax touch with a Raspberry Pi. I noticed that most "ubuntu" or "debian" derived Rasp-Pi distros support the touch out of the box which is great. However when using XBMC (since it's running in framebuffer) does not work. I was wondering where I can help (although I'm not a developer) or what I have to do to have the core development team of XBMC to look at this?

Any ideas are welcome...

PS: There a a zillion blogs, tutorials, etc out there discussing how to get it working. Trust me: I've tried them all without any luck (been trying for almost 3 months now :'( ).

Any help, tips, suggestions are welcome!
Reply
#8
Not really the right thread mate - maybe try the linux support forum.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply

Logout Mark Read Team Forum Stats Members Help
Any hints for touch screen supportin script?0