Python 2.7 Kivy:用kv设计

Python 2.7 Kivy:用kv设计,python-2.7,kivy,Python 2.7,Kivy,我想删除两行之间未使用的空间。 这是我的.kv文件: <MainLayout>: text_input: text_input logo100: logo100 rows: 3 orientation: 'horizontal' GridLayout: cols: 2 orientation: 'vertical' row_force_default: True row_d

我想删除两行之间未使用的空间。 这是我的.kv文件:

<MainLayout>:
    text_input: text_input
    logo100: logo100

    rows: 3

    orientation: 'horizontal'

    GridLayout:
        cols: 2
        orientation: 'vertical'
        row_force_default: True 
        row_default_height: 50
        padding: 20
        spacing: 10


        Image:
            id: logo100
            source: 'logo100.png'
            size_hint: .2, .1
            texture: self.texture
            size: self.texture_size

        TextInput:
            id: text_input
            markup: True
            font_size: 32
            size_hint: 1.8, .1
            multiline: False                    
            on_text_validate: root.on_enter()
            hint_text: 'Enter the url of the website and click enter'
这样做很好,但不,我不知道如何解决这个问题

我找到了一个简单的解决方案: 将
size\u hint\u y:None
添加到kv文件中的
GridLayout

Builder.load_string("""
#:import lv kivy.uix.listview
#:import la kivy.adapters.listadapter
#:import fa kivy.factory.Factory

<ListItemButtonTitle@ListItemButton>:
    selected_color:   [24.0, 1.0, 0.39, 0.6]
    deselected_color: [1.0, 1.0, 1.0, 0.0]
    font_size: 32
    size: 100, 100
    line_height: 1
    #spacing: 100    

<ListViewModal>:
    list_view: list_view_id
    padding: 100
    spacing: 30

    ListView:
        id: list_view_id
        size_hint: .98,.98

        adapter:
            la.ListAdapter(data = "",
            cls=fa.ListItemButtonTitle)
""")
row_force_default: True 
row_default_height: 50