Page 1 of 2

HDROIDGUI

Posted: Mon Feb 23, 2015 9:13 pm
by Roberto Lopez
Hi All,

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"
As you can see, it is extremely easy.

This is the announce in Harbour users group:
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.
HDROIDGUI is self-contained and do not depends or require H4A to work.

The Harbour for Android landscape has changed drastically. Now we have a lightweight, fast and simple tool to work with.

HDROIDGUI

Posted: Mon Feb 23, 2015 9:19 pm
by Pablo César
Thank you Roberto for the news !

Interesting indeed !

Re: HDROIDGUI

Posted: Mon Feb 23, 2015 9:47 pm
by mol
Thx!

Re: HDROIDGUI

Posted: Tue Feb 24, 2015 12:00 am
by danielmaximiliano
Como siempre gracias Roberto por este nuevo trabajo que desarrollas..
probaré esto cuando me entreguen mi nuevo Android ya que el anterior me duro solo una semana..

Re: HDROIDGUI

Posted: Tue Feb 24, 2015 2:37 am
by Rathinagiri
Very much interesting. It gives hope and light.

Re: HDROIDGUI

Posted: Tue Feb 24, 2015 8:31 am
by bpd2000
+1

Re: HDROIDGUI

Posted: Tue Feb 24, 2015 11:09 am
by serge_girard
Thanks Roberto!

Serge

Re: HDROIDGUI

Posted: Tue Feb 24, 2015 7:49 pm
by Roberto Lopez
danielmaximiliano wrote:Como siempre gracias Roberto por este nuevo trabajo que desarrollas..
<...>
No es mi trabajo. Yo simplemente lo difundo.

Re: HDROIDGUI

Posted: Thu Mar 05, 2015 10:59 pm
by mol
how to build this gui?
I'm trying this software, but without any good results.... :-(

Re: HDROIDGUI

Posted: Fri Mar 06, 2015 7:19 am
by dragancesu
Hard work, see, do it very carefully

http://hmgforum.com/viewtopic.php?f=35& ... oid#p40096

the author uses the older versions so pay attention to, say, 21.1.2 and now the current version 24.0.2

but the version for android 5.0.1 but the API 21

and I was a little confused but it work and finally made .apk