Recent

Author Topic: LCL-CustomDrawn substitutes LCL-Android  (Read 83538 times)

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #15 on: December 05, 2011, 06:35:15 pm »
Could I use small text images, on the button, or as label for example. I only need about 10 basic controls (Label, Button, TextEdit, Memo, Listbox, checkbox, trackbar, progressbar, panel, image) and something I can paint on.

I implemented today basic support for TBitmap and TCanvas.Draw(X, Y, TBitmap), so yes, you can use images for text.

TTrackBar and TProgressBar already worked before and TButton and TCheckBox work except for the text.

TEdit/TMemo is very far because the require a lot of features, in fact they so far that I am considering if I should put temporarely a native TEdit and TMemo for use in Android. Probably I'll try this temporary work around.

TLabel and TListBox require text support and TCDListBox isn't yet finished too.

Do you need text in TPanel? If no, then it should be easy to implement.

TImage maybe even already works, I'm not sure. It would be good if you can test.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #16 on: December 06, 2011, 02:23:45 am »
I simply remove -WR from the "Project Options" and it could be built successfully.Then I use the command  "ant debug" and I get the APK(1.7M).when I  install into the emulator and click the icon,nothing happens! I am sure it is for ARM  by the command "file ****"  .So I do not know where the wrong goes!

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #17 on: December 06, 2011, 02:27:10 am »
@felipemdc
OK that is super, I will give it a try now and see what happens. Great work man!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #18 on: December 06, 2011, 07:44:16 am »
I simply remove -WR from the "Project Options" and it could be built successfully.Then I use the command  "ant debug" and I get the APK(1.7M).when I  install into the emulator and click the icon,nothing happens! I am sure it is for ARM  by the command "file ****"  .So I do not know where the wrong goes!

Like written here, whenever something goes wrong always use adb logcat:

http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Oh_no.21_My_LCL_Android_application_doesn.27t_work

But I'd bet that your problem is what I have already written before: you should not use fpc 2.6.0, you need to use fpc 2.5.1 from svn trunk from 19th january.

The OpenGL example works fine with fpc 2.6.0 because it uses very few features and RTL calls (actually none?), but the LCL uses a huge amount of RTL features and calls and those will crash because of a bug introduced in february.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #19 on: December 06, 2011, 08:44:48 am »
Quote
you need to use fpc 2.5.1 from svn trunk from 19th january.

Hi felipemdc!
So how to get fpc 2.5.1(19th january ) by the command SVN?? What is   The revision of fpc2.5.1 (19th january ) ? So I could use the command "svn update -r ***".
« Last Edit: December 06, 2011, 08:51:54 am by Jonathan »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8746
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #20 on: December 06, 2011, 08:55:32 am »
Quote
how to get fpc 2.5.1(19th january )
Here you go

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #21 on: December 06, 2011, 08:56:26 am »
Hi felipemdc!
So how to get fpc 2.5.1(19th january ) by the command SVN?? What is   The revision of fpc2.5.1 (19th january ) ? So I could use the command "svn update -r ***".

You can find this info in the fpc viewcv: for example you could try this revision: http://svn.freepascal.org/cgi-bin/viewvc.cgi?view=rev&revision=16790

I don't remember anymore which one I used exactly, but I think it shouldn't matter much.

But like Leledumbo said, you can use the pre-compiled snapshot x86-linux -> arm-linux which is known to work very well.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #22 on: December 06, 2011, 09:03:53 am »
Quote
But like Leledumbo said, you can use the pre-compiled snapshot x86-linux -> arm-linux which is known to work very well.

Hi felipemdc, Could you give me the link about that? I do not know the details!

Jonathan

  • New Member
  • *
  • Posts: 40
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #23 on: December 06, 2011, 09:11:24 am »
Here you go

I tried  hours ago!  I did the Step 3 - Install the Free Pascal Cross-Compiler ,then I  make the lastest lazarus and met an  Error,so the lazarus was not installed successfully!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #24 on: December 06, 2011, 09:28:20 am »
I tried  hours ago!  I did the Step 3 - Install the Free Pascal Cross-Compiler ,then I  make the lastest lazarus and met an  Error,so the lazarus was not installed successfully!

Please describe more specifically what you did, step-by-step, showing console command lines for example, even screenshots if necessary, and the relevant parts of the output in the command line. Your description of what you tried is so imprecise that I can only try guessing what you actually did.

Jonathan

  • New Member
  • *
  • Posts: 40
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #25 on: December 06, 2011, 09:51:03 am »
Oh,Sorry!
 I did  as  Android_Interface#Using_the_pre-compiled_compiler said.
Required Environment: FPC 2.4.4
Step1: I install binutils2.22 instead ,because my system :Ubuntu .I do not find suitable cross-arm-linux RPM.
Step2,3,4:I did the same as the tutorial.
After Step 4:I try to  make install the lastest svn lazarus ,but not successfully!
« Last Edit: December 06, 2011, 10:15:13 am by Jonathan »

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #26 on: December 06, 2011, 10:28:55 am »
After Step 4:I try to  make install the lastest svn lazarus ,but not successfully!

Could you show the output of these commands:

cd lazarussvn
fpc
make bigide

Jonathan

  • New Member
  • *
  • Posts: 40
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #27 on: December 06, 2011, 10:46:15 am »
 %)   
I find that It lacks some packages........I  figure out that the command "apt-get install -f" does not works successfully!

felipemdc

  • Administrator
  • Hero Member
  • *
  • Posts: 3538
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #28 on: December 13, 2011, 07:24:25 am »
Could I use small text images, on the button, or as label for example. I only need about 10 basic controls (Label, Button, TextEdit, Memo, Listbox, checkbox, trackbar, progressbar, panel, image) and something I can paint on.

Actually now I am implementing native text, so very soon a lot of those controls will be working.

I also implemented MessageBox / MessageDlg via native dialogs. Changing between forms works too, although so far only fullscreen forms are supported. But I already see how to support dialogs.

The next steps are:

1> Implement DPI awareness in the LCL

2> Optimizing Invalidate to invalidate only 1 control when requested so

LA.Center

  • Full Member
  • ***
  • Posts: 244
    • LA.Center
Re: LCL-CustomDrawn substitutes LCL-Android
« Reply #29 on: December 13, 2011, 09:02:55 am »
@felipemdc
You the man :)

 

TinyPortal © 2005-2018