Tkinter to android translation

I have a relatively simple tkinter program that just uses Event, Button, and Label objects. I would like to translate this to use on the Android platform.

1) Which python for android should i use? QPython, py4a?

2) And on this platform, which graphical interface should I use?

I would like to know a little why you think which particular module or application will be better, since I just enter the scene with Android and want to make an intelligent jump.

+12
python android tkinter
source share
2 answers

You will need to use py4a to create Android applications in python. Take a look at this site: https://ep2013.europython.eu/conference/talks/developing-android-apps-completely-in-python

+1
source share

Even for their own purposes, most developers will advise you to stay away from Tkinter. It is an outdated and not intuitive library that often makes creating and maintaining a graphical interface more difficult than necessary.

The main advantage of developing applications using the Python library and embedding in Android is cross-platform support . These libraries often make it easy to port your application to many different operating systems.

I will not answer what is β€œbest,” as this is an opinion-based question that goes beyond StackOverflow, however I will say that (as a rule) it is easier to port from Kivy to Android than in some other libraries (such as Qt ).). But take this with a crumb of salt. Most libraries currently offer advanced GUI built-in capabilities, and your choice is not likely to limit you in this regard.

In any case, there is no direct / easy way to translate your Tkinter project into any of them, and you may have to rewrite it with the library of your choice.

I will add that if your intention is developed only for Android, most of them would advise developing in their native Android language, such as Java or Kotlin, or using a development tool that uses such languages. This will reduce the size of the APK and probably speed up your application.

0
source share

All Articles