Forum > Lazarus
LCL-CustomDrawn substitutes LCL-Android
felipemdc:
--- Quote from: Leledumbo on December 01, 2011, 03:05:50 am ---Nice idea, Felipe. I also agree with this. Android seems has different point of view regarding GUI architecture (activity vs form, etc.) and that's contradictive with current LCL approach.
--- End quote ---
Except for the need to save the application state when going to background, I don't see any incompatibility. I still have to verify what exactly that will mean for us and what will need to be done / extended to support this.
About Activity, the vast majority of Android applications have only 1 activity and the second activity is usually a crash logger.
herux:
hello felipe, my library can not loaded, as shown in the logs below
--- Code: ---12-01 15:28:34.208: I/lclproject(433): Trying to load liblclapp.so
12-01 15:28:34.248: D/dalvikvm(433): Trying to load lib /data/data/com.pascal.lcltest/lib/liblclapp.so 0x405154d8
12-01 15:28:34.298: E/lclproject(433): WARNING: Could not load liblclapp.so
12-01 15:28:34.328: W/System.err(433): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]: 33 cannot locate 'iconv_open'...
12-01 15:28:34.328: W/System.err(433): at java.lang.Runtime.loadLibrary(Runtime.java:434)
12-01 15:28:34.348: W/System.err(433): at java.lang.System.loadLibrary(System.java:554)
12-01 15:28:34.348: W/System.err(433): at com.pascal.lcltest.LCLActivity.<clinit>(LCLActivity.java:73)
12-01 15:28:34.348: W/System.err(433): at java.lang.Class.newInstanceImpl(Native Method)
12-01 15:28:34.348: W/System.err(433): at java.lang.Class.newInstance(Class.java:1409)
12-01 15:28:34.348: W/System.err(433): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
12-01 15:28:34.398: W/System.err(433): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
12-01 15:28:34.398: W/System.err(433): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
12-01 15:28:34.398: W/System.err(433): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
12-01 15:28:34.398: W/System.err(433): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
12-01 15:28:34.398: W/System.err(433): at android.os.Handler.dispatchMessage(Handler.java:99)
12-01 15:28:34.398: W/System.err(433): at android.os.Looper.loop(Looper.java:123)
12-01 15:28:34.398: W/System.err(433): at android.app.ActivityThread.main(ActivityThread.java:3683)
12-01 15:28:34.408: W/System.err(433): at java.lang.reflect.Method.invokeNative(Native Method)
12-01 15:28:34.408: W/System.err(433): at java.lang.reflect.Method.invoke(Method.java:507)
12-01 15:28:34.408: W/System.err(433): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
12-01 15:28:34.431: W/System.err(433): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
12-01 15:28:34.431: W/System.err(433): at dalvik.system.NativeStart.main(Native Method)
--- End code ---
I have checked the file
--- Code: ---$ file liblclapp.so
liblclapp.so: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped
--- End code ---
I use this fpc version, does it cause?
--- Code: ---Free Pascal Compiler version 2.6.0rc1 [2011/11/11] for arm
Copyright (c) 1993-2011 by Florian Klaempfl and others
/home/herux/Documents/fpcsvn/tags/release2_6_0/compiler/ppcrossarm [options] <inputfile> [options]
Put + after a boolean switch option to enable it, - to disable it
-a The compiler doesn't delete the generated assembler file
-al List sourcecode lines in assembler file
-an List node info in assembler file
-ap Use pipes instead of creating temporary assembler files
-ar List register allocation/release info in assembler file
-at List temp allocation/release info in assembler file
--- End code ---
felipemdc:
From your error I would say that you didn't do step 2 here:
http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Compiling_the_example_LCL_Android_Application
See also:
http://wiki.lazarus.freepascal.org/Custom_Drawn_Interface/Android#Step_2_-_Configuring_the_LCL
LA.Center:
felipemdc, does this mean that we can now paint on the form? Which controls are supported? please forgive if maybe a dumb question.
felipemdc:
--- Quote from: plusplus on December 03, 2011, 11:50:12 pm ---felipemdc, does this mean that we can now paint on the form?
--- End quote ---
Yes. TForm.OnPaint is supported. TCustomControl descendents which draw themselves are also supported. Multiple levels of controls inside controls are also supported, and also OnMouseDown, OnMouseUp, OnMouseMove
--- Quote --- Which controls are supported? please forgive if maybe a dumb question.
--- End quote ---
Only TButton (without text), TCheckBox (without text), TArrow, TProgressBar and TTrackBar
http://wiki.lazarus.freepascal.org/Roadmap#Status_of_native_controls_on_each_widgetset
Adding controls is very simple and easy, but the major problem is that we lack text support, so for many controls it gets pointeless to add them before text support is finished.
If you need any particular control just say and I can add it before other ones, but keep in mind that I estimate that it might take some months to get text rendering to work properly.
Navigation
[0] Message Index
[#] Next page
[*] Previous page