ScrollView works on desktop, but not on Android

32 views
Skip to first unread message

Abstract Donut

unread,
Jul 29, 2020, 1:39:30 AM7/29/20
to Kivy users support
I have an app that has two separate ScrollView's, the first one is filled with labels and works on both desktop and Android. The second one is filled with buttons and works on desktop but not Android. 

The code for the second one looks like

<SettingsScreen>:
    GridLayout:
        rows: 3
        cols: 1
        TitleLabel:
            id: title
            size_hint: 1, .15
            text: "SETTINGS"
        ScrollView:
            do_scroll_x: False
            do_scroll_y: True       
            SettingsLayout:
                id: layout
        ImageButton:
            size_hint: 1, .08
            on_release: app.root.escape()
            source: "images/icons/back.png"

Where 'SettingsLayout' is a GridLayout with size_hint: 1, 2 and populated with ButtonLabel's (which is a custom class inheriting from ButtonBehavior and Label).

The thing that is perplexing to me is that scrolling works on my desktop environment, even if I click on one of the buttons and drag up or down. But when I compile to .apk and launch on my phone, scrolling no longer works within this second ScrollView.

Since the other ScrollView I have within my app works properly on Android, I'm led to believe this is a problem with the buttons absorbing the touch movement. But this doesn't seem to be the case on the desktop app where I can click on the button and drag my mouse up or down to cause the SettingsLayout to scroll.

I am wondering if someone has experienced this or has any ideas.

Thanks

planckp...@gmail.com

unread,
Jul 29, 2020, 2:53:29 AM7/29/20
to Kivy users support
Same version of Kivy on both platforms?

Abstract Donut

unread,
Jul 29, 2020, 2:43:12 PM7/29/20
to Kivy users support
Much to my surprise it wasn't.

I changed the kivy requirement to kivy==master and ran a clean build and the kivy version is now 2.0.0rc3 on Android. The only difference now is that the desktop version uses python 3.6 while the android version uses python 3.8.

Abstract Donut

unread,
Jul 29, 2020, 2:44:02 PM7/29/20
to Kivy users support
Sorry, I forgot to add that unfortunately this didn't fix my problem. I still can't scroll with the ScrollView that's populated with ButtonLabels.
Reply all
Reply to author
Forward
0 new messages