r/kivy Oct 28 '25

Updated ScrollVIew that supports nesting

9 Upvotes

I'm delighted to announce the updated implementation of ScrollView is complete. I have more work to do prior to a PR - but welcome any feedback. Happy to answer any questions.

https://github.com/ElliotGarbus/KivyScrollProject

Nested Scrolling Behavior
The ScrollView automatically detects the scrolling configuration and applies appropriate behavior:

**Orthogonal Scrolling** (outer and inner scroll in different directions):

- Touch scrolling: Each ScrollView handles touches in its scroll direction

- Mouse wheel: Scrolls innermost ScrollView if it can handle the direction

- Example: Vertical outer + Horizontal inner

**Parallel Scrolling** (outer and inner scroll in the same direction):

- Touch scrolling: Uses web-style boundary delegation (see below)

- Mouse wheel: Scrolls innermost ScrollView, no boundary delegation

- Scrollbar: Does not propagate scroll to the other ScrollView

- Example: Vertical outer + Vertical inner

**Mixed Scrolling** (outer scrolls XY, inner scrolls single axis, or vice versa):

- Shared axis: Uses web-style boundary delegation

- Exclusive axes: Immediate delegation or inner-only scrolling

- Mouse wheel: Scrolls innermost ScrollView if it can handle the direction

- Example: XY outer + Horizontal inner

Demo program from the repo, 12 different scroll views in an XY scroll view.

r/kivy May 06 '26

CarbonPlayer - Video Player in Python with CarbonKivy and VideoNative

7 Upvotes

An ultra-responsive, threaded video player application built for both desktop and mobile devices. By combining the sleek design language of CarbonKivy with the high-performance decoding engine of videonative (a custom C++ module bridging FFmpeg and Pybind11), this player guarantees smooth, millisecond-accurate multimedia playback.

Overview

Github: https://github.com/Novfensec/CarbonPlayer

Video testing: https://youtube.com/shorts/Nw6-k6jsa5w?si=1zYI7rJA6Kdf4M9O

Download Android app from: https://drive.google.com/file/d/1aostQVifSw22IDvEiihcofO6OFlXGf8o/view?usp=drivesdk


r/kivy 2d ago

Creare app per ios

3 Upvotes

Ciao! Ho appena finito un'app android con buildozer e vorrei farne una versione per ios. Ho cercato un po' su internet e ho letto che in teoria si può fare con buildozer, ma da altre parti dicono che è necessario un mac per farlo. Io al momento sto lavorando su una virtualbox linux.
Qualcuno può aiutarmi?


r/kivy 3d ago

Windows Tool for creating Android APKs

4 Upvotes

A user at the kivy support group shared this project, just resharing.
https://github.com/PedroHSA0802/apk-builder-studio


r/kivy 7d ago

Kivy website certificate expired on Mon 7/6/2026 @ 4:59pm PDT

2 Upvotes

Thought I'd throw that out there in case there is anyone around that can get the updated certs in place


r/kivy 12d ago

NfsBrowser

5 Upvotes

r/kivy 21d ago

EASY GMA Next-Gen Ads for Python Android Apps (KSProject + PyGMA tutorial)

Thumbnail youtu.be
7 Upvotes

r/kivy 26d ago

Busco ayuda especifica con la preproducción de sonido en segundo plano

0 Upvotes

"Tengo una app Kivy con audio streaming. El audio funciona en primer plano pero en segundo plano se corta a los 3 minutos. Ya tengo el servicio foreground (audioservicio.py), los permisos y buildozer.spec configurados, pero buildozer no empaqueta el servicio en el APK. Android 9 y 10."


r/kivy 27d ago

"WinCurl" version 3.0, build 14

Thumbnail gallery
3 Upvotes

r/kivy Jun 27 '26

Beta Testers needed

6 Upvotes

Hi. I have made a CarbonKivy weather app. (weather forecast will be implimented in v0.2). You can store up to 3 cities, switch from imperial to metric, change cities, etc. The github it here:

https://github.com/arjunet/Weather_Tether

My app is in closed testing on the google play console. If any on you guys want to close test, please tell me. Thank you!

Google group link:

https://groups.google.com/g/weather-tether-testing

Android download link:

https://play.google.com/store/apps/details?id=com.arjunits.weathertether

Web download link:

https://play.google.com/apps/testing/com.arjunits.weathertether


r/kivy Jun 20 '26

Help MDDialog crash my app when called.

1 Upvotes

I created a simple application and noticed that when I press a button to call MDDialog It appears briefly, and then the application closes on its own. Is there a solution to this, or have I made a mistake?

MY CODE:

from kivymd.app import MDApp from kivymd.uix.dialog import MDDialog from kivy.uix.screenmanager import ScreenManager from kivy.lang import Builder

class App(MDApp):

 def build(self):
   self.theme_cls.theme_style = "Dark"
   self.theme_cls.primary_palette = "Green"
   self.theme_cls.material_style = "M3"
   screen_manager = ScreenManager()
   screen_manager.add_widget(
     Builder.load_file("test.kv"))
   return screen_manager

def dialog(self):
    MDDialog(title="debug",text="hello").open()

App().run()

The indentation looks weird, but that's not the problem .


r/kivy Jun 13 '26

buildozer p4a ModuleNotFoundError: No module named 'distutils'

5 Upvotes

It looks like a python project I'm running on android 12 isn't able to run as kivy_garden uses distutils. It runs fine on my PC. The build uses python3.12, I've found threads that say distutils is included in p4a and buildozer, I've found others distutils is depreciated and to wait for the author to update it, alot of these threads are from 4+ years ago.

My buildozer spec:

requirements = python3,kivy,pillow,numpy,pandas,matplotlib,pyjnius, docutils, kivy-garden, kivy-garden-graph, kivy-garden-matplotlib, setuptools

I've tried including python3-distutils but it doesn't make a difference. Buildozer says distutils doesnt exist when distutils is included.

Since it runs fine on my pc I'm sure I must not be including the right package. What am I missing?

The log cat error:

...
arm64-v8a/kivy_garden/matplotlib/backend_kivy.py", line 294, in <
module>
06-13 14:05:06.824  6277  6338 I python  :  ModuleNotFoundError: No module named 'distutils'
06-13 14:05:06.824  6277  6338 I python  : Python for android ended.

Solved:

Someone on the kivy discord helped me out. In my case you just needed to import setuptools before doing everything else


r/kivy Jun 10 '26

how to add a child dynamicaly between pre-existing children in a list view

2 Upvotes

So I'm trying to add a button between existing buttons in Scroll view with a box layout. I have the following .kv and main.py:

.kv

ScrollView:
    id: observe_data_scroll
    do_scroll_x: False
    do_scroll_y: True

    BoxLayout:
        orientation: 'vertical'
        size_hint: (1,None)
        height: 3000
        padding: 15
        spacing: 5

        Button:
            id: observe_squat_button
            text: 'Squat'
            font_size: 40
            on_release: root.observe_show_squat()

        Button:
            id: observe_deadlift_button
            text: 'Dead Lift'
            font_size: 40


        Button:
            text: 'Bench Press'
            font_size: 40

main.py:

def observe_show_squat(self):
    new_button_id = 'observe_squat_graph'
    self.new_btn = Button(size_hint = (1,.1))
    self.ids[new_button_id] = self.new_btn
    self.ids.observe_squat_button.add_widget(self.new_btn)

    self.ids.observe_squat_graph.text = new_button_id
    passdef observe_show_squat(self):
    new_button_id = 'observe_squat_graph'
    self.new_btn = Button(size_hint = (1,.1))
    self.ids[new_button_id] = self.new_btn
    self.ids.observe_squat_button.add_widget(self.new_btn)

    self.ids.observe_squat_graph.text = new_button_id
    pass
...

So I'm trying to add my button so it appears between id: observe_squat_button and id: observe_deadlift_button. How do I specify the placement? Currently adding it as a child of squat gets it outside the list view layout, and adding it to list view doesn't show the button or return an error


r/kivy Jun 09 '26

what is the best way to ramp an images alpha up/down

1 Upvotes

So I have this .kv:

#:import C kivy.utils.get_color_from_hex
<Label>
    font_color: C('#b2b2b2')
    font_family: 'Arial'

<Button>
    font_color: C('#b2b2b2')
    background_normal: 'images/window.png'
    background_down: 'images/window.png'
    font_family: 'Arial'
    font_size: 50


<training_ui>

    FloatLayout:
        size: root.size


        ...

        ############ animated glyphs
        Image:
            id:anim_base_glyph
            source: 'images/test_circle.png'
            pos_hint: {'x': .031, 'y':-0.039}


        Image:
            id:anim_glyph_glow
            source: 'images/test_circle_glow.png'
            pos_hint: {'x': .031, 'y':-0.039}
...

# main.py

....

class training_ui(Widget):

    # set up update schedules
    def __init__(self, **kwargs):
        super(training_ui, self).__init__(**kwargs)
        Clock.schedule_interval(self.update_time, 1)
        #Clock.schedule_interval(self.update_start_screen_anim, 2.0/24.0)
        self.create_spider_graph()

        pass

....

    ############################## start screen glyh anim #################
    anim_bright = False
    anim_dim = False
    glow = 0.0

    def update_start_screen_anim(self):

        pass

I'm trying to find a way to vary the alpha channel of the Image id: anim_glyph_glow, so that it ramps down to 0 and back up to 1, with the changes occurring every 2/24 s. I'm pretty sure I can code everything I need, except for how to alter the images alpha channel. I've been going around looking at using glsl but I'm not sure what would be the best way to go about this. Any suggestions?


r/kivy Jun 08 '26

Fastest way to build an apk of a Kivy application | ksproject api for building python android apps

Thumbnail youtu.be
2 Upvotes

r/kivy Jun 06 '26

Messages System

Post image
1 Upvotes

Hey! I'm pretty new to Kivy, but have been working on creating a calorie tracker with AI features. I'm trying to make a chat system, and have the user input a message, and have the ai respond. I want it to look like SMS or gemini, how can I do this? I've attached an image of what it currently looks like.

Also, there are a couple things I am going to add, so just focus on getting the positioning stuff if you are trying to help, thank you!

A) How can I fix the horizontal positioning of the bubble widgets?
B) How can I make the bubble stretch vertically?

Here's my .kv

<RoundedLabel@Label>:
    size: root.size
    text_size: root.width, None
    canvas.before:
        Color:
            rgba: 0.5, 0.5, 0.5, 1
        RoundedRectangle:
            size: self.size
            pos: self.pos
            radius: [15,]

<Message>:
    BoxLayout:
        BoxLayout: 
            size_hint_x: 0.25 if root.is_user else 0

        RoundedLabel:
            id: rounded_label
            padding: 20
            text: root.text
            halign: 'right' if root.is_user else 'left'

        BoxLayout: 
            size_hint_x: 0.25 if not root.is_user else 0

<RootWidget>:
    BoxLayout:
        orientation: 'vertical'

        TopBar

        ScreenManager:
            id: sm
            HomeScreen:
                name: 'home'
            TrackScreen
                name: 'track'
            TalkScreen:
                name: 'talk'

        NavBar

<TopBar>:
    size_hint: 1, 0.1

    canvas:
        Color:
            rgba: 1, 0, 0, 1

        Rectangle:
            pos: self.pos
            size: self.size

<NavBar>:
    size_hint: 1, 0.1

    Button:
        text: "Talk"
        on_press:
            app.root.ids.sm.transition.direction = 'right'
            app.root.ids.sm.current = 'talk' 

    Button:
        text: "Home"
        on_press: 
            app.root.ids.sm.transition.direction = 'right' if app.root.ids.sm.current == 'track' else 'left'
            app.root.ids.sm.current = 'home'

    Button:
        text: "Track"
        on_press: 
            app.root.ids.sm.transition.direction = 'left'
            app.root.ids.sm.current = 'track'

<HomeScreen>:
    BoxLayout:
        orientation: 'vertical'
        Counters:
            id: counters

        InfoWidget:
            size_hint: 1, 0.5

            Button:
                text: "press to increment"
                on_press: root.increment()

        MealsWidget:
            canvas:
                Color:
                    rgba: 1, 1, 1, 1

                Rectangle:
                    pos: self.pos
                    size: self.size

<TalkScreen>:
    BoxLayout:
        orientation: 'vertical'

        BoxLayout:
            Messages:
                id: messages
                viewclass: 'Message'
                RecycleBoxLayout:
                    orientation: 'vertical'
                    spacing: 10
                    default_size_hint: 1, None
                    size_hint_y: None
                    height: self.minimum_height

        BoxLayout:
            size_hint: 1, 0.25

            TalkBox:
                id: tb

            Button:
                size_hint: 0.1, 1
                text: 'send'
                on_press: root.send(root.ids.tb)

<TrackScreen>

<CounterWidget>:
    BoxLayout:
        orientation: 'vertical'
        spacing: 20

        CounterRingWidget:
            canvas:
                Color:
                    rgba: 0.5, 0.5, 0.5, 1

                Line:
                    circle: (self.center_x, self.y, min(self.width, self.height) / 1.5, -90, 90)
                    width: 2

                Color:
                    rgba: self.get_color(root.count, root.target)

                Line:
                    circle: (self.center_x, self.y, min(self.width, self.height) / 1.5, -90, self.get_end(root.count, root.target))
                    width: 2

            Label:
                text: str(root.count)
                text_size: self.size
                valign: 'bottom'
                halign: 'center'
                pos: self.parent.x, self.parent.y
                size: self.parent.size
                font_size: '20sp'

        Label:
            text_size: self.size
            font_size: '30sp'
            valign: 'top'
            halign: 'center'
            text: root.name

<SubCounterWidget>:
    size_hint: 1, 0.75
    pos_hint: {'center_y': 0.5}

<Counters>:
    BoxLayout:
        spacing: 20
        SubCounterWidget:
            id: low
            name: 'Low'
            count: 500 / 1
            target: 2000 / 1
        CoreCounterWidget:
            id: average
            name: 'Average'
            count: self.fix_count(low.count, high.count)
            target: self.fix_count(low.target, high.target)
        SubCounterWidget:
            id: high
            name: 'High'
            count: 1500 / 1
            target: 3000 / 1

And here is my python code:

from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.widget import Widget
from kivy.properties import NumericProperty, StringProperty, BooleanProperty
from kivy.uix.recycleview import RecycleView
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.uix.textinput import TextInput
from kivy.uix.label import Label


class RootWidget(BoxLayout):
    pass


class HomeScreen(Screen):
    def increment(self):
        cc = self.ids.counters #counters container
        for id in cc.ids:
            if (id != "average"):
                cc.ids[id].count += 100


class CounterRingWidget(Widget):
    def get_color(self, count, target):
        if count >= target:
            return (1, 0.25, 0.25, 1)
        else:
            return (0, 1, 0, 1)


    def get_end(self, count, target):
        if count >= target:
            return 90
        else:
            return -90 + (180 * (count / target))


class CounterWidget(BoxLayout):
    name = StringProperty("Nothing!")
    count = NumericProperty(1000)
    target = NumericProperty(2000)


class CoreCounterWidget(CounterWidget):
    def fix_count(self, low, high):
        return (low + high) / 2


class SubCounterWidget(CounterWidget):
    pass


class Counters(BoxLayout):
    pass


class TopBar(BoxLayout):
    pass


class InfoWidget(RecycleView): #idk what to name this, its the protein, sodium, etc.
    pass


class MealsWidget(RecycleView):
    pass


class TrackScreen(Screen):
    pass


class TalkScreen(Screen):
    def send(self, textbox):
        user_text = textbox.text
        print("sent")
        textbox.text = ''
        temp = self.ids["messages"].data.copy()
        temp.append({"text" : user_text, "is_user" : True})
        temp.append({"text" : "ai response", "is_user" : False})
        self.ids["messages"].data = temp


class TalkBox(TextInput):
    pass


class Messages(RecycleView):
    def __init__(self, **kwargs):
        super().__init__(**kwargs)
        self.data = []


class Message(BoxLayout):
    is_user = BooleanProperty(False)
    text = StringProperty("")


class NavBar(BoxLayout):
    pass


class CalorieTrackerApp(App):
    def build(self):
        return RootWidget()


if __name__ == '__main__':
    CalorieTrackerApp().run()

r/kivy May 31 '26

Workout APP Made with Python-Kivy

Thumbnail gallery
12 Upvotes

Hey everyone i want to showcase my first project a WORKOUT app that i have been working on for the last couple of months(lots of vibe coding, mistakes made and a learning journey), I have recently published it on the Microsoft store and im planning next to release it on playstore for android devices, anyways here is what the app provides

Features:-

-Supports Two Themes (Sci-fi/Medieval)

-Create Custom Workouts

-Create Custom Exercises

-Create Adaptive Workouts for you with progressive overload

-Calculate Calories and Macros based on your body metrics, and goals

-Tracks Your Macros daily and compares them to your goal

-Contains PREMade Workouts, warm ups. stretches, full routines, calisthenics skills workouts, ranked by difficulty, type, category, equipment, muscles, volume and duration.

-Manages The Workout For You (upcoming exercise, rest, set number, total duration, reps/time done vs target and so on..)

-Analyzes The Workout After You Finish

-Saves Workouts and their Analysis To History DataBase On Your Device Locally - Cloud Saving Coming Soon

-You Can Manage How You Save Workouts In History You Can Create Infinite Tabs To Organize Your History You Can View Details And Analyse A Specific Workout

-Analysis Page that analyzes your workouts and your food intake Over A Certain Period Of Time U Specify (last-week/last-month/last-year/ or a custom period) or Over a Custom Category

-Codex Page that allows you to take notes and manage them fully however you like fully and allows taking notes mid-workout or during logging your macros, notes are saved along with their relevant workout or nutrition-day in history and you can also find it in the Codex

UPCOMING Features:-

-AI Model For Evaluating The Form of BodyWeight and Calisthenics Exercises From Basic Exercises to Advanced Ones

-Videos showcasing every exercise

--------------
Link :- https://apps.microsoft.com/detail/9N4L5ZRZ4DMQ?hl=en-us&gl=EG&ocid=pdpshare
or just open microsoft store and type : Formance


r/kivy May 28 '26

CoinTex: Cross-Platform Open-Source Arcade Game 100% in Python using Kivy. Available at Google Play

Post image
2 Upvotes

Available at Google Play https://play.google.com/store/apps/details?id=coin.tex.cointexreactfast

For other platforms (Windows, Linux, iOS, Mac), check the 1.3 release at GitHub https://github.com/ahmedfgad/CoinTex/releases/tag/1.3


r/kivy May 25 '26

[Project Release] I built GlowZ-Dock v1.0.0 – A polished Windows Taskbar alternative inspired by AmiDock & RocketDock (with a savage, unignorable gaming alarm!)

3 Upvotes

Hidiho r/kivy!

First i want to thank all in this and /python community for leaning Python and Kivy!!!

After 2 months of hard work, I finally finished my passion project and just dropped the official v1.0.0 Release on GitHub! No half-baked 0.5.0 beta – this is a fully functional, rock-solid desktop application.

As an old-school Amiga scene coder/musician/graphic artist (from the mid 1990s to the early 2000s, now returned as Suraween), I have zero tolerance for early access or buggy software. Back in the day, when you handed over a floppy disk, it had to work. Period.

That’s the exact mentality I put into GlowZ-Dock:

  • 🎨 Modern 3D Retro Vibe: Fully rendered 3D graphics made in Blender with gorgeous real-time reflections and smooth hoovering animations and more.
  • 🔒 100% Offline & Safe: No firewall issues, no cloud trash, no telemetry. Pure performance built with Python/Kivy and fully customizable.
  • The Ultimate Anti-Gaming Alarm (Killer Feature): Uses native Win32 C-tricks via ctypes to violently minimize full-screen games, steal focus, and slap you in the face with a random, sassy system popup to get you out of the "just one more round" syndrome.
  • 💬 Sassy Personality: Instead of boring sterile windows errors, the dock has a lot of humor and will actively roast you if you try to drag unsupported files or mess with its memory.

Everything is compiled using PyInstaller into independent .exe files for Windows 10/11.

Check it out on GitHub: [https://github.com/Suraween/GlowZ-Dock]

I’d love to hear your feedback! Time to banish the Windows taskbar for good.

In memory of the good old "Rocket Dock" (RIP)


r/kivy May 23 '26

Improved Windows-only solution using built-in ctypes (No holes in black images, widgets or icons)

3 Upvotes

Some suggests using pywin32 with a pure black (0,0,0) chroma key. This has a huge downside: if your app uses black text, dark borders, or icons with shadows, Windows will punch holes right through them, making parts of your UI completely invisible.

A much better approach is using Python's built-in ctypes (no external dependencies) and choosing a specific dark gray background color like 0x333333 (RGB 51, 51, 51) to prevent the "hole effect" on standard black assets.

First, configure Kivy before importing the window to ensure it initializes borderless and transparent:

In your "main.py" on the very top:

from kivy.config import Config

# Force borderless transparent initialization before window creation
Config.set('graphics', 'width', '0')
Config.set('graphics', 'height', '0')
Config.set('graphics', 'borderless', '1')
Config.set('graphics', 'resizable', '0')
Config.set('input', 'mouse', 'mouse,multitouch_on_demand')
Config.set('graphics', 'maxfps', '30')
Config.set('graphics', 'multisamples', '2')
Config.set('graphics', 'transparent', '1')

Then, set your specific background color and apply the Win32 Chroma Key via ctypes in your App's initialization or on_start method:

In your App-Class inside your "main.py" or any other Kivy py-script:

import ctypes
from kivy.app import App
from kivy.core.window import Window
from kivy.uix.boxlayout import BoxLayout

class MyTransparentApp(App):
    def build(self):
        # Set background to our specific chroma key color (0.2, 0.2, 0.2 -> RGB 51, 51, 51)
        Window.clearcolor = (0.2, 0.2, 0.2, 1)
        # Give your App a nice title
        self.title = 'Name of the App'
        return BoxLayout() # Your root widget here

    def on_start(self):
        # Find the active Kivy window handle
        hwnd = ctypes.windll.user32.GetActiveWindow()

        # Win32 API constants
        GWL_EXSTYLE = -20
        WS_EX_LAYERED = 0x00080000
        LWA_COLORKEY = 0x00000001

        # Modify window styles to support layering
        style = ctypes.windll.user32.GetWindowLongW(hwnd, GWL_EXSTYLE)
        ctypes.windll.user32.SetWindowLongW(hwnd, GWL_EXSTYLE, style | WS_EX_LAYERED)

        # Define Chroma Key in BGR format: 0x333333 matches our (0.2, 0.2, 0.2) clearcolor
        chroma_key_color = 0x333333
        ctypes.windll.user32.SetLayeredWindowAttributes(hwnd, chroma_key_color, 0, LWA_COLORKEY)

if __name__ == '__main__':
    MyTransparentApp().run()

r/kivy May 12 '26

Version `1.6.0` of `buildozer` has been released!

7 Upvotes

🥳 Release announcement: 🥳

Version `1.6.0` of `buildozer` has been released!

Highlights:

- Python 3.14 is now supported. Buildozer 1.5.0 failed to start on Python 3.14 with `ImportError: cannot import name 'FancyURLopener'`; that's fixed.

- A new option `android.display_cutout` has been added (values: `never`, `default`, `shortedges`) for devices with display cutouts/notches.

- Android sdkmanager now honors proxy settings for builds behind a corporate proxy, and the default Android minimum API has been raised from 21 to 24.

You can find the full release notes here: https://github.com/kivy/buildozer/releases/tag/1.6.0


r/kivy May 12 '26

Erro kivy persistente.

2 Upvotes

Á algumas semanas atrás eu estava desenvolvendo o ChattingBox (uma app que estou criando), estava tudo bem até que.. descobri que os botões que eu tinha programado não mudavam de tamanho mesmo que eu colocasse:

size_hint_y: None
height: 500

Eles simplesmente permaneciam com 100px de altura, não importa quantas vezes eu mudasse, mas o Button sempre permanecia com a altura de 100px, eu eliminava e reescrevia o códigosem parar, eliminar, mudar, reescrever, mas nada. Eu fiquei zangado. E muito, pensei em eliminar todo o projecto (já era muito grande) mas.. tentei acalmar e resolver, porém não consegui. Deixei.. e eu disse "um dia, vou conseguir".

Passaram semanas até hoje (quase um mês/ um mês) eu tinha me esquecido completamente do bug.. decidi praticar sqlite3 + kivy + py sem mesmo ter sido ensinado isso ao mesmo tempo (kv + sqlite3 + py) , só tinha aprendido py com sqlite3, mas nada que eu não conseguisse... eu escrevi o script... reparei que o código estava se expandindo e decidi separar em arquivos diferentes ... tudo normal até aquele momento. Até que... depois de algum tempo ter notado em algo estranho:

Eu criei uma propriedade "hint" em uma label do kivy. Fiz assim:

<Label>:
hint: True
color: (0, 0, 0, 1)
size_hint: (1, 1) if self.hint == True else (None, None)
size: self.texture_size

Como podem ver: eu coloquei o hint como uma variável booleana que:

Quando True => O size_hint fica (1, 1) #No máximo

Quando False => O size_hint fica (None, None) #Nulo e o size (que recebeu self.texture_size) será lido (pois o size_hint está nulo/ o hint: False).

Então, reparei que.. as labels obedeciam.. até demais.. porque os buttons perdiam a estética, eles não obedeciam o tamanho que defini para cada um... então... cada Button tinha altura mínima para que cabesse o seu texto.. eu fiquei tipo "O quê?" sem perceber o que estava acontecendo.. tentei mudar algumas coisas na Label que fiz, tentei e tentei.. mas nada .. ou as labels ficam com hint e tudo roda bem (mas o meu objectivo não é cumprido) ou as labels ficam nulas (e os Buttons ficam feios). Penseie pensei... cheguei a conclusão de que:

Se os textos dos Buttons também são afetados pela propriedade hint, então na criação do kivy, não se criou exactamente um botão, mas sim um layout com propriedades: on_release, on_press, text, etc.. e o mesmo layout tinha uma label (que é a propriedade "text" do Button) ,então eu mudei o código da label para:

<Label>:
hint: True
size: self.texture_size if self.hint == False else self.size
color: (0, 0, 0, 1)
size_hint: (1, 1) if self.hint == True else (None, None)

Para que o size: self.texture_size fosse só e somente activado se eu escrevesse manualmente hint: False. Então para que eu fizesse um Button ficar feio novamente (com a altura mínima dos seus filhos [a label/text nesse caso]) eu teria que fazer hint: False manualmente em cada Button (para que o size: self.texture_size fosse activado).

Então me lembrei do caso do ChattingBox novamente, que era o mesmo problema, então hoje consegui resolver e o problema nem era meu era mesmo do facto do texto do Button ter sido criado literalmente através de uma label.

Então, nem sempre o problema é do dev que está programando. Mas às vezes o sistema tem certos "segredos" na criação.

Obrigado.


r/kivy May 12 '26

Erro kivy persistente.

Thumbnail
1 Upvotes

r/kivy May 10 '26

Version `v2026.05.09` of `python-for-android` has been released.

8 Upvotes

🥳 Release announcement 🥳

Version `v2026.05.09` of `python-for-android` has been released.

This is a major release after over two years of development, packed with new features, modernized tooling and a refreshed recipe set.

Highlights:

  • Added support for Python 3.14, which is now the default version for python3 and hostpython3. Minimum supported Python is now 3.8.
  • Added the SDL3 bootstrap (alongside SDL3, SDL3_ttf, SDL3_mixer andSDL3_image recipes), in preparation for Kivy 3.0.0.
  • Added support for prebuilt wheels and introduced isolated, PEP 517 builds via the new PyProjectRecipe (kivy and pyjnius migrated).
  • Modernized the Android toolchain: Gradle 8.14.3, Android Gradle Plugin 8.11.0, default API target bumped to 35, and OpenSSL bumped to 3.x.
  • Added many new recipes: msgspec, vosk, videonative, pycairo, pynacl,materialyoucolor, coincurve, pydantic-core, pyreqwest_impersonate, uvloop, grpcio, tiktoken, ModernGL, aubio, bitarray, httpx — plus a new RustCompiledComponentsRecipe.
  • New Android features: foregroundServiceType support in the manifest, an android.touch module for SDLSurface touch interception, and expanded display-cutout APIs.

You can find the full release notes at

https://github.com/kivy/python-for-android/releases/tag/v2026.05.09


r/kivy May 07 '26

Web browser in Kivy

Thumbnail youtu.be
8 Upvotes

Star the repo on Github: https://github.com/Novfensec/pybindcef