Alexander Kresin has released the first version of HDROIDGUI: A Harbour GUI development tool for Android.
To test it, there is a project on GriHub called HDCALCUL.
The setup is nearly the same as H4A with two exceptions:
1. You must use JDK version 7 instead 8.
2. You must install Android NDK.
You must change setenv.bat paths according this. and create a folder called 'bin' at HDCALCUL project root.
This is how the source code looks like:
Code: Select all
#include "hdroidgui.ch"
FUNCTION HDroidMain
LOCAL oActivity, oLayV, oLayH1, oBtn1, oEdit1, oText1
ACTIVITY oActivity TITLE "Calculator"
BEGIN LAYOUT oLayV SIZE MATCH_PARENT,MATCH_PARENT
BEGIN LAYOUT oLayH1 HORIZONTAL SIZE MATCH_PARENT,WRAP_CONTENT
EDITBOX oEdit1 HINT "Input an expression" SIZE 0,MATCH_PARENT
BUTTON oBtn1 TEXT "Ok" TEXTCOLOR 255 SIZE WRAP_CONTENT,WRAP_CONTENT ;
ON CLICK {||onBtn1(oEdit1,oText1)}
END LAYOUT oLayH1
TEXTVIEW oText1 TEXTCOLOR 10485760 BACKCOLOR "#FFFFFF" SIZE MATCH_PARENT,MATCH_PARENT
END LAYOUT oLayV
RETURN oActivity
STATIC Function OnBtn1( oEdit1, oText1 )
LOCAL s, xRez, bOldError, lRes := .T.
s := oEdit1:GetText()
bOldError := ErrorBlock( { |e|break( e ) } )
BEGIN SEQUENCE
xRez := &( Trim( s ) )
RECOVER
xRez := "Error..."
END SEQUENCE
ErrorBlock( bOldError )
oText1:SetText( Iif( xRez == Nil, "Nil", Iif( Valtype(xRez)=="A", "Array", ;
Transform( xRez, "@B" ) ) + Chr(10)+Chr(13) + oText1:GetText() ) )
RETURN "1"
This is the announce in Harbour users group:
HDROIDGUI is self-contained and do not depends or require H4A to work.Hi,
I just created two new projects on the github:
https://github.com/alkresin/HDroidGUI - HDroidGUI - a new Android GUI framework for Harbour ( or Harbour GUI framework for Android )
https://github.com/alkresin/hdcalcul - a calculator sample, which uses the HDroidGUI.
The documentation, as usually , delayed. I'll create a web page later.
Pay attention to hdroidgui/utils/newproject.prg. It is a standalone utility, which creates a new project, based on HDroidGUI. Hdcalcul was created with it.
The Harbour for Android landscape has changed drastically. Now we have a lightweight, fast and simple tool to work with.