How do I use ScrollEffect on a ListView to prevent overscrolling?

Viewed 207

I am using the same way to prevwnt overscrolling of a TextView like that:

ScrollView:
    id: scrlv
    size_hint: (1, 1)
    effect_cls: ScrollEffect #avoid overscrolling
    TextInput:
        id: ro_log
        size_hint: (1, None)
        height: max(self.minimum_height, scrlv.height) #required to enable scrolling when list starts to grow
        readonly: True
        background_color: 0,0,0,0
        foreground_color: 1,1,1,1

But for a ListView, which contains a ScrollView, the kv spec below has no effect:

ListView:
    id: commandListView
    effect_cls: ScrollEffect #no effect !
    adapter: ListAdapter(data=[], cls=main.CommandListButton, args_converter=lambda row_index,rec: {'text':rec, 'on_press':root.commandSelected})
    height: '0dp'
    size_hint_y: None
2 Answers
Related