DEV Community

Cover image for How to create a simple To-do list application with Kivymd

How to create a simple To-do list application with Kivymd

Ngonidzashe Nzenze on October 19, 2021

To-do list applications are a simple way to get started with learning different frameworks. I am going show you how to create one. With that, let's...
Collapse
 
rto profile image
Romy Opeña

Learned a lot from your sample app here. Now, may I ask you if I can modify-tinker with your program a little bit and integrate it with a few small apps into one single app for Android (for personal use only)? Thanks.

Collapse
 
ngonidzashe profile image
Ngonidzashe Nzenze

I am glad you learned something. Please make use of it as you see appropriate. You're welcome.

Collapse
 
aakritigoyal12458 profile image
AakritiGoyal12458

Tysm for such an amazing todo list

Collapse
 
dharshikisarapu profile image
dharshikisarapu

checking whether the C compiler works... no
configure: error: in /content/.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/other_builds/freetype/armeabi-v7a__ndk_target_21/freetype/builds/unix':
configure: error: C compiler cannot create executables
See
config.log' for more details
make: *** [builds/unix/detect.mk:91: setup] Error 77
how can i resolve this

Collapse
 
joser profile image
Jose Cruz Recinos

It looks like the problems is that you have in your buildozer.spec the target architecture like this: "android.archs = arm64-v8a, armeabi-v7a" and then buildozer cannot find the sources to install in order to compile the packages from the "requirements=" option for this architecture "armeabi-v7a", the easiest way to solve this issue is to remove that architecture and compile for "arm64-v8a" only since the armeabi-v7a or arm-v7a it's already deprecated.

Collapse
 
overflow profile image
overFlow

hey YOU!!! new guy!!!!
WE welcome you here by force. with love.
You like it or not you shall be loved here at dev.to. Loved and Loved Dearly.
WElcome.

Collapse
 
agrillea profile image
agrillea

I'm running this great example you made. Unfortunately, the requirements you specified are no longer valid. What do I need to change in the Buildozer requirements to make it work. Thank you

Collapse
 
ngonidzashe profile image
Ngonidzashe Nzenze

Glad you liked the article! I'll update the article soon.

I've managed to use the following requirements to get it to run successfully:
requirements = python3,kivy==2.1.0,kivymd==1.1.1,sdl2_ttf==2.0.15,pillow,android

Hope that helps

Collapse
 
joser profile image
Jose Cruz Recinos

Does anybody knows how to make this function work with KivyMD 2.0.1.dev0?
def show_task_dialog(self):
if not self.task_list_dialog:
self.task_list_dialog = MDDialog(
cls=DialogContent(),
)
self.task_list_dialog.open()
Like this above it results an error before to run the app:
Error: 'MainApp' object has no attribute 'task_list_dialog'
So I changed to this:
def show_task_dialog(self):
self.task_list_dialog = MDDialog(
cls=DialogContent(),
)
self.task_list_dialog.open()
Then it runs but it results in another error when called by:
on_release: app.show_task_dialog()
The console log bellow:
self.task_list_dialog = MDDialog(
^^^^^^^^^
File "kivy/event.pyx", line 262, in kivy._event.EventDispatcher.init_
File "kivy/properties.pyx", line 520, in kivy.properties.Property.set
File "kivy/properties.pyx", line 938, in kivy.properties.ListProperty.set
File "kivy/properties.pyx", line 815, in kivy.properties.ObservableList.init
TypeError: 'DialogContent' object is not iterable

Any idea how to fix it? thank you.

Collapse
 
yassimosan profile image
Yassim Osa

Thanks for this amazing project. I wanted to ask you a question: what exactly should I modify to change the Check Boxes with Radio Buttons? I've really tried everything, but without getting what I want. Thank you.

Collapse
 
ngonidzashe profile image
Ngonidzashe Nzenze

Hi,

The check boxes in kivymd work as radio buttons if you group them. Check out this documentation for more details. I hope it will be helpful.

Collapse
 
vinaybsee profile image
vinaybsee

It is a great post. I have tried the same steps. Everything works fine, but while converting to apk and after installing in android app it is showing loading and closes the app. Any way to resolve that. I followed the proper steps and created the .apk. Please can you guide me as I am in a learning phase using python.

Collapse
 
ngonidzashe profile image
Ngonidzashe Nzenze

Hello. I'm glad you liked the post. The best way to figure out why your app is crashing on android is to install it using ADB(android debug bridge). This will allow you to trace the error encountered by your program during execution. If you have never used ADB before, check out this article(the very bottom section), in which I go over the basics of how you can use it. I hope that helps :)

Collapse
 
sehgalspandan profile image
Spandan Sehgal

Really nice and helpful post you nailed it .
I have saved it
Keep it up

Collapse
 
ngonidzashe profile image
Ngonidzashe Nzenze

Thanks a lot

Collapse
 
mudjaycker profile image
maryimana butom

Good Tuto even one year later ! liked it a lot ! hopefully kivy could be used as a good alternative to ionic & capacitor, java, native script frameworks family or even kotlin ... hhh

Collapse
 
youssouf profile image
Joseph BAYEMI

Thank for this tutorial. Nice written

Collapse
 
stasserov profile image
stasserov

Thanks for the article! I understood from your article how to pass references to objects through method arguments! It wasn't easy before. Thank you very much!

Collapse
 
regina_parasi profile image
mybeaut

Hello,

How are you, I tried out your code but it fails with the below error.
init() missing 1 required positional argument: 'url'

Kindly assist.

Collapse
 
drizzyovo profile image
Gaurav Malpedi

Can you please show me how to include a text file or a JSON file as a database. I wanna make a kivy desktop application in onefile. It's giving me error. Please help me out.