+ 2

(Closed) To whoever knows about Kivy(md) framework.

So I was working on a Calculator app, everything was going well until I got a problem with it: the buttons in the main screen do not work on my phone, except '0' and '.'. I do not really know what's the problem but I hope that it can be fixed. Main.py: https://pastebin.com/zMmHr7ds Main.kv: https://pastebin.com/iDQrPETh Note: You are free to remove the custom font.

19th Feb 2023, 4:07 PM
Ervis Meta
Ervis Meta - avatar
8 Answers
+ 1
So first thing that maybe fix this is i your kv file you should set id or name for all buttons to sort them it can be a issue if you using im case that androidapp use xml files and you will need to set all to variables. Means no hardcoded text. The android device cant figure put which button exactly. A other thing that i realized is an issue with the mdrounded button. You can try install a earlier version from kivymd if i remeber right i had some issues with buttons too as i made this ttt app.
25th Feb 2023, 8:59 PM
S3R43o3
S3R43o3 - avatar
+ 1
It took a while, but I got where was the problem: I had two layers, the simple one and the avanced one. When drawn, the avanced was on top of the simple one, and as it was disabled and with no opacity, it was blocking the other layer. So the answer was just simply creating an instance for each and then adding or removing them from the `main_scr`. I hope you find my misunderstanding helpfull on your coming projects :-)
28th Feb 2023, 3:20 PM
Ervis Meta
Ervis Meta - avatar
+ 1
Oh great but yeah youre right =D id didnt see that, so iam sorry in case you facing any other issue in the compile process like me: That lines are important in you buildozer.spec file # comma separated e.g. requirements = sqlite3,kivy requirements = python3,kivy,pillow,kivymd,sdl2_ttf so great you get that and thanks for your advice =) happy coding
1st Mar 2023, 12:34 PM
S3R43o3
S3R43o3 - avatar
0
Hey dude first off you can checkout my github (get link on my profile here) there is a fully android app with kivymd and i comment the code very beginner friendly Sooo with kivy and android it comes to some problems if you compile it to apk. You have to make sure that you get the permissions from android sdk for some native things like storage and stuff. Kivy is sometime a bit tricky so and now i check your code and may i can figure out what happen
25th Feb 2023, 8:46 PM
S3R43o3
S3R43o3 - avatar
0
I remember that i have the code for the tictactoe app here too: https://code.sololearn.com/c2waQY4U6nJR/?ref=app
25th Feb 2023, 8:48 PM
S3R43o3
S3R43o3 - avatar
0
First of all thanks for your replay. Secondly, I am using Kivy==2.0.0 and KivyMd==1.0.1 so I thought it was fine this way. And ... for the `id`, sincerely I was lazy to just give names to all buttons, but I guess I should.
25th Feb 2023, 9:05 PM
Ervis Meta
Ervis Meta - avatar
0
Happy if i can help you. Had hours of research too may use my configuration and versions... The buttonproblem had many othrr users. So its a bit ago and i really cant remember which exactly fix the problem but iam sure we can figure it out... Spend 3 weeks to get a working apk 😂 cause u need Ubuntu to compile and specific settings with builddozer. Also you need add a dependencie manually on the buildozer config file... Iam on my ipad right now i guess i didnt upload config file to github but i will check on my pc tomorrow and tell you which things you need to add
25th Feb 2023, 9:15 PM
S3R43o3
S3R43o3 - avatar
0
Also require a specific sdk to work i am sure i made some notice in the projectdirectory... I use sololearn mostly on my ipad cause on my pc i do stuff with code and dont help here đŸ€Ł anyways , dont worry we will get this
25th Feb 2023, 9:18 PM
S3R43o3
S3R43o3 - avatar