Documente Academic
Documente Profesional
Documente Cultură
txt]
RAD Android!
.Github
ref. https://github.com/jmpessoa/lazandroidmodulewizard
.Forum
ref. http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html
I. Infrastructure
.Android SDK [old] --- "ant" and "gradle" build supported... [recommended!!!]
[Windows] http://dl.google.com/android/installer_r24.0.2-windows.exe
[Linux] http://dl.google.com/android/android-sdk_r24.0.2-linux.tgz
[Mac] http://dl.google.com/android/android-sdk_r24.0.2-macosx.zip
[Windows] https://dl.google.com/android/repository/sdk-tools-windows-
3859397.zip
[Linux] https://dl.google.com/android/repository/sdk-tools-linux-
3859397.zip
[Mac] https://dl.google.com/android/repository/sdk-tools-darwin-
3859397.zip
.Android NDK
https://developer.android.com/ndk/downloads/index.html
:: OR Lazarus [canonical]
Do It Yourself cross Android compile! [windows]:
After install the LAMW go to:
1. IDE "Tools" --> "[Lamw] Android Module Wizard" --> "Get FPC
Source [Trunk]"
2. IDE "Tools" --> "[Lamw] Android Module Wizard" --> "Build FPC
Cross Android"
http://ant.apache.org/bindownload.cgi
Simply extract the zip file to a convenient location...
https://gradle.org/next-steps/?version=4.1&format=bin
Simply extract the zip file to a convenient location...
.Install order.
tfpandroidbridge_pack.lpk [..../android_bridges]
lazandroidwizardpack.lpk [..../android_wizard]
amw_ide_tools.lpk [..../ide_tools]
III. USE
1. Configure Paths:
Lazarus IDE menu "Tools" ---> "[Lamw] Android Module Wizard" --> "Path
Settings ..."
ref. https://od.lk/f/Ml8xNTU4Mjc1NDZf
ref. https://od.lk/f/Ml8xNTU4Mjc1NThf
2.3-Press OK Button.
2.4. From Form "Android Module wizard: Configure Project..." [Workspace Form]
ref. https://od.lk/f/Ml8xNTU4Mjc1NjBf
example: C:\MyLamwProjects
example: LamwGUIProject1
[This is your Android App/Apk name]
2.6-[MinSdk] Select the Min. Device Api need to run your App:
example: 14
2.8-Select Architecture/Instruction:
example: ARMv6
example: [DefaultDevice]
2.9.Click "OK"
3. From "Android Bridge" component tab drag/drop a jTextView in the "Android Module
Form" designer
set property:
PosRelativeToParent = [rpTop,rpCenterHorizontal]
WARNING!
.Please, whenever a dialog prompt, select "Reload from disk"
4. From "Android Bridge" component tab drag/drop a jButton the "Android Module
Form" designer
set property:
Anchor = jTextView1
set property:
PosRelativeToAnchor : [raBelow]
set property:
PosRelativeToParent = [rpCenter]
PANIC? Go to Google search with "android usb debugging <device name>" to get
the operating mode adapted to your device...
ex. Galaxy S3/S4 --> app settings --> about -->> Build number -->>
[tap,tap,tap,...]
ex. MI 2 --> app settings --> about -->> MIUI Version -->>
[tap,tap,tap,...]
7.Lazarus IDE menu "Run" ---> "[Lamw] Build Apk and Run" [Congratulations!!!]
.<uses-sdk android:minSdkVersion="15"
android:targetSdkVersion="17"/>
[Congratulations!!!]
10. NOTE: All LAMW projects [and demos] are Eclipse compatible!
Thank you!
Thanks to All!
#Question: How do we can design a layout that shown same in real device?
"Anchor",
"PosRelativeToParent",
"PosRelativeToAnchor",
"LayoutParamHeight",
"LayoutParamWhidth"
Example:
Set "PosRelativeToParent"
"rpCenterHorizontal" [True]
"rpTop" [True]
Set "Anchor" to "jTextView" (Because you should set position relative with
"jTextView")
set "PosRelativeToAnchor"
"raBelow" [True]