Touch screen sensitivity for buttons in Gridlayout

77 views
Skip to first unread message

Johannes Vogel

unread,
Apr 17, 2017, 11:42:03 AM4/17/17
to Kivy users support
Hi Everyone,

I am having trouble with the touchscreen sensitivity on Android machine (Samsung Galaxy S7 and Nexus 7) for dynamically created buttons in a gridlayout.

I tried to make a minimal example of it, but just to give you some background on this. I wrote this as part of a two page menu. In this case, you have a first menu with three buttons, you click on "Level select" and then you have another menu with as many buttons as there are levels, here represented by range.

On my PC, the on_press recognition works fine, but the moment, I move this onto a touch screen I have to hammer on the screen ca. 50 times before it recognises the "click". Btw. I use the kivy app to test the script.

Does anyone of you have an explanation for this and ideally a solution?

Thanks a lot in advance for all suggestions :)

Happy Easter :)

Johannes
main.py

Johannes Vogel

unread,
Apr 19, 2017, 1:21:41 PM4/19/17
to Kivy users support
*Bump*

Did anyone manage to replicate my trouble with the touch recognition on android touch screens using the Kivy Launcher?

Thanks :)

ZenCODE

unread,
Apr 19, 2017, 3:05:08 PM4/19/17
to Kivy users support
As an experiment, try removing the scrollview? I remember we had similar issues but not as bad. Please try that and post back. Also, which version of kivy?

Johannes Vogel

unread,
May 16, 2017, 10:16:35 PM5/16/17
to Kivy users support
Hi ZenCODE,

Sorry for the late reply and thank you for your input. I appreciate it.

I removed the scrollview as you suggested and the effect is that the touch recognition works now very well, based on the visual output that I see (touch button, button is clicked), but, of course, now I cannot scroll :-(

With regards to the version, I am posting the output given in my ubuntu terminal

1.9.1-2~stable0+201612301832~pkg153~ubuntu16.04.1

I tried to upgrade to a higher version, but it tells me that the latest version is already installed...

Thanks for any more input on this :)

Johannes

ZenCODE

unread,
May 17, 2017, 2:45:52 AM5/17/17
to Kivy users support
Okay, progress :-). Then the next step is to put back the ScrollView and adjust the various scroll parameters in the configuration to see if you can get it responsive?

https://kivy.org/docs/api-kivy.config.html

Johannes Vogel

unread,
May 18, 2017, 10:58:58 PM5/18/17
to Kivy users support
Hi ZenCODE,

Thanks a lot for your input. I am honest with you, I am struggling with this part. The only two non-deprecated parameters mentioned are scroll_timeout and scroll_distance.

Both of these are supposed to be changeable via the config.ini (see https://kivy.org/docs/api-kivy.uix.scrollview.html under Scrolling Behaviour)

I am using Kivy Launcher on my Android and I cannot find the folder under which the .kivy folder with this file is stored. The path mentioned on the website is just not present with me (please see https://kivy.org/docs/guide/config.html)

Also when playing around with adjusting these two values under Ubuntu in the config.ini, I could set them to ludicrously high or low numbers, but the behaviour was the same.

Using def config_build in my App class (please see code for that below), also showed no difference to the normal behaviour.

    def build_config(self,config):
        config.setdefaults('widgets', {
            'scroll_timeout': 55,
            'scroll_distance': 2000
            })

Could you give me a hint of what I am doing wrong or maybe direct me towards a code snippet that can help me out on that?

Thanks a lot :)

Johannes
Reply all
Reply to author
Forward
0 new messages