DroidUi

a Python UI library for Android

This project is maintained by iptux

DroidUi - a Python UI library for Android

Now Python is able to run on Android platform thanks to Scripting Layer for Android and Python for Android project. But the User Interface Facade is hard to use. Most of the time, more than one call is needed to achieve your simplest goal. And the fullShow call in FullScreenUI need a XML style layout.

But what if you want to control the layout by programming, or change the layout dynamically at run time? I need a more elegant UI library, that is why DroidUi.

Quick Start

Let's start with Hello world example,

import DroidUi                                     # yes, you need it

layout = DroidUi.DroidUi()                         # layout object comes first
hello = DroidUi.Button(layout,                     # add this Button to the layout
                       text = 'Hello, DroidUi!',   # set the button text
                       command = layout.quit)      # quit the layout when button clicked
layout.mainloop()                                  # enter mainloop

Run this example will give you a big button full of your screen, click button will quit this example.

There are mainly two kinds of object in DroidUi:

DroidUi also support showing a layout from a existing XML layout, use DroidUi.DroidUi.fromxml() and DroidUi.DroidUi.fromfile() to get the layout object

Requirement

Install

License

DroidUi is licensed under GPLv3 by Tommy Alex

Links