2

I have a simple GUI program that has 2 text fields for number entry and a button to press to get sum of these numbers. It uses the portable IUP for GUI elements:

require( "iuplua" )

t1 = iup.text{}
t2 = iup.text{}
btn = iup.button {title = "SUM:"}
qbtn = iup.button{title="Quit"}
reslab = iup.label{}

function btn:action()
    v1 = tonumber(t1.value)
    v2 = tonumber(t2.value)
    resstr = string.format("%d", (v1 + v2))
    reslab.title = resstr
    dlg:show()
end
function qbtn:action()
    os.exit()
    end

dlg = iup.dialog {
 iup.vbox{
    iup.hbox{
        iup.label{title="First:"},
        t1  },
    iup.hbox{
        iup.label{title="Second:"},
        t2  },
    iup.hbox{
        btn,
        reslab  },
    iup.hbox{
        iup.label{},
        qbtn,
        iup.label{} } }, 
 title = "BMI"}

dlg:show()
iup.MainLoop() 

How can I run this simple program in Android? I am not able to find IUP guidance for Android. Does it needs to be rewritten with some other GUI library? Which one(s) is/are good? Thanks for your help.

rnso
  • 23,686
  • 25
  • 112
  • 234
  • Take a look at https://coronalabs.com/ if you'd like to write mobile applications/games with Lua. – Rok Oct 26 '17 at 21:07

1 Answers1

2

For now, there is no IUP for Android. There is a prototype, as seen in the last Lua Workshop (2017) but it is not ready yet. Sorry I don't have any recommendations I'm not an Android developer.

Antonio Scuri
  • 1,046
  • 6
  • 10
  • 2
    My first thought was **“Sad!”** because I love IUP. But then I realised there’s good news: it’s under development. **Yay!** (I hate Android but it’s a necessary evil from which IUP could protect us.) – 7vujy0f0hy Oct 27 '17 at 03:26