HDROIDGUI

Issues and Discussions related to Harbour

Moderator: Rathinagiri

User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

HDROIDGUI

Post 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.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

HDROIDGUI

Post by Pablo César »

Thank you Roberto for the news !

Interesting indeed !
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
danielmaximiliano
Posts: 2612
Joined: Fri Apr 09, 2010 4:53 pm
Location: Argentina
Contact:

Re: HDROIDGUI

Post 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..
*´¨)
¸.·´¸.·*´¨) ¸.·*¨)
(¸.·´. (¸.·` *
.·`. Harbour/HMG : It's magic !
(¸.·``··*

Saludos / Regards
DaNiElMaXiMiLiAnO

Whatsapp. := +54901169026142
Telegram Name := DaNiElMaXiMiLiAnO
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: HDROIDGUI

Post by Rathinagiri »

Very much interesting. It gives hope and light.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
bpd2000
Posts: 1207
Joined: Sat Sep 10, 2011 4:07 am
Location: India

Re: HDROIDGUI

Post by bpd2000 »

+1
BPD
Convert Dream into Reality through HMG
User avatar
serge_girard
Posts: 3165
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: HDROIDGUI

Post by serge_girard »

Thanks Roberto!

Serge
There's nothing you can do that can't be done...
User avatar
Roberto Lopez
HMG Founder
Posts: 4004
Joined: Wed Jul 30, 2008 6:43 pm

Re: HDROIDGUI

Post by Roberto Lopez »

danielmaximiliano wrote:Como siempre gracias Roberto por este nuevo trabajo que desarrollas..
<...>
No es mi trabajo. Yo simplemente lo difundo.
Regards/Saludos,

Roberto


(Veritas Filia Temporis)
User avatar
mol
Posts: 3720
Joined: Thu Sep 11, 2008 5:31 am
Location: Myszków, Poland
Contact:

Re: HDROIDGUI

Post by mol »

how to build this gui?
I'm trying this software, but without any good results.... :-(
User avatar
dragancesu
Posts: 921
Joined: Mon Jun 24, 2013 11:53 am
DBs Used: DBF, MySQL, Oracle
Location: Subotica, Serbia

Re: HDROIDGUI

Post 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
Post Reply