Recent

Author Topic: Android Module Wizard  (Read 710486 times)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #390 on: May 09, 2015, 07:00:17 am »
Hi All!

There is an updated revision of Lamw/Lazarus Android Module Wizard

https://github.com/jmpessoa/lazandroidmodulewizard

Version 0.6 - rev. 23 - 09 May 2015 -

   NEW! 
      jShellCommand component <<---A suggestion and request @greenzyzyzy

   NEW! Demo AppExecuteShellCommandDemo1 [Eclipse Compatible Project]

   NEW! Android Manifest Editor:
      Lazarus IDE: "Project' --> "Project Option" --> "[Lamw] Android Manifest"
[Thanks to  @A.S.]

   IMPROVEMENTS! components visual design    [Thanks to @A.S.]

Thanks to All!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #391 on: May 09, 2015, 08:37:03 am »
I hope you will update sms reading function soon  :)

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #392 on: May 09, 2015, 08:51:57 am »
@m4u_hoahoctro

Ok! I will do!

Thank you!
« Last Edit: May 09, 2015, 11:22:13 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #393 on: May 10, 2015, 01:09:37 pm »
@m4u_hoahoctro

Quote
I hope you will update sms reading function soon  :)

Done!

Lamw: Version 0.6 - rev. 24 - 10 May 2015 -

https://github.com/jmpessoa/lazandroidmodulewizard

   NEWS! 
      jAnalogClock component
      jDigitalClock component

   IMPROVED!
      jSMS Added new "Read" method // <<--- A suggestion and request by @m4u_hoahoctro
      jEditText Added new "AppendLn" method
      jTextView Added new "AppendLn" method

   NEWS!
      Demo AppClockDemo1 [Eclipse Compatible Project]
      Demo AppSMSDemo1 [Eclipse Compatible Project]

Thanks to All!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #394 on: May 10, 2015, 03:29:25 pm »
great  8-)

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #395 on: May 10, 2015, 08:50:34 pm »
Hello Jmpessoa

In the new version introduces the ability to destroy the form and free the memory?

The Jspinner does not fully work.  :'(
    
Impossible to put on the form the required number of components :'( :'( :'(

My main problem is not solved. :'( :'( :'( :'( :'( :'(

With Respect
rx3.fireproof

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #396 on: May 10, 2015, 09:26:35 pm »
@rx3.fireproof

I think that all these problems are related to memory management ....

What about your "assets"? What about images files sizes?

example: In my tests jSpinner is OK for a huge entry!

OK, I'll see what I can improve!

Thank you!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #397 on: May 11, 2015, 12:11:23 am »
@Jmpessoa

Now made form (actsplah) with 6 jspinners and 30 jimageviews with images from assets and drawable (halfpast). 
In each jspinner  added on 10000 items. Everything works.

I have something wrong with the layout. Try to understand.

I made  test new project.

May be an error while upgrate code template with old version LAMN?

With Respect
rx3.fireproof

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #398 on: May 11, 2015, 01:00:30 am »
@rx3.fireproof

Quote
...May be an error while upgrade code template with old version LAMW?

Yes, may be.....

You can try:

1. Upgrade Code templates: [*.lpr] and [*.java]

2. Run --> Clean up and Build

When prompt "Read error" [Unknown Property] just choice:  "Continue Loading" !!
[Now simulate any property change in component, i.e., tag = 1  and save the project]

3. Run --> [Lamw] Build Apk and Run      //<<---------- connect your device [usb] !

Thank you!
« Last Edit: May 11, 2015, 01:10:46 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #399 on: May 12, 2015, 05:28:01 pm »
I am having a problem with display00
In this image, I set Jtextview ( :
Postoanchor: raalignleft is true, raalignirght is true and ratorightof is true
but they dont' have same size when displayed
 :(

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #400 on: May 12, 2015, 06:02:05 pm »
Hi m4u_hoahoctro,

Please, "*.zip" [or "*.rar"] your project and send me: jmpessoa(AT)hotmail(DOT)com

or put it in some online open drive.

I will try some solution....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #401 on: May 13, 2015, 03:58:37 am »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2302
Re: Android Module Wizard
« Reply #402 on: May 13, 2015, 05:00:34 am »
Hi  m4u_hoahoctro,

Here is a modified "unit2.lfm"

Code: [Select]
object AndroidModule2: TAndroidModule2
  Left = 945
  Top = 48
  Width = 300
  Height = 600
  MarginLeft = 0
  MarginTop = 0
  MarginRight = 0
  MarginBottom = 0
  Text = 'AndroidModule2'
  ActivityMode = actMain
  BackgroundColor = colbrDefault
  OnJNIPrompt = AndroidModule2JNIPrompt
  object jTextView1: jTextView
    Left = 5
    Top = 5
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    PosRelativeToAnchor = []
    PosRelativeToParent = [rpTop, rpLeft]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView1Click
    Id = 3718151
  end
  object jTextView2: jTextView
    Left = 76
    Top = 5
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView1
    PosRelativeToAnchor = [raToRightOf]
    PosRelativeToParent = [rpTop]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'B'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView2Click
    Id = 9461189
  end
  object jTextView3: jTextView
    Left = 147
    Top = 5
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView2
    PosRelativeToAnchor = [raToRightOf]
    PosRelativeToParent = [rpTop]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'C'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView3Click
    Id = 6341291
  end
  object jTextView4: jTextView
    Left = 218
    Top = 5
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView3
    PosRelativeToAnchor = [raToRightOf]
    PosRelativeToParent = [rpTop, rpRight]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'B'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView4Click
    Id = 5522042
  end
  object jTextView5: jTextView
    Left = 5
    Top = 76
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpLeft]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView5Click
    Id = 7622216
  end
  object jTextView6: jTextView
    Left = 76
    Top = 76
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView5
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView6Click
    Id = 8770245
  end
  object jTextView7: jTextView
    Left = 147
    Top = 76
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView6
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView7Click
    Id = 7830331
  end
  object jTextView8: jTextView
    Left = 218
    Top = 76
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView7
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = [rpRight]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView8Click
    Id = 1969942
  end
  object jTextView9: jTextView
    Left = 5
    Top = 147
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView5
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpLeft]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView9Click
    Id = 2190527
  end
  object jTextView10: jTextView
    Left = 76
    Top = 147
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView9
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView10Click
    Id = 4756362
  end
  object jTextView11: jTextView
    Left = 147
    Top = 147
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView10
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView11Click
    Id = 2589130
  end
  object jTextView12: jTextView
    Left = 218
    Top = 147
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView11
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = [rpRight]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView12Click
    Id = 0
  end
  object jTextView13: jTextView
    Left = 5
    Top = 218
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView9
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpLeft]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView13Click
    Id = 1752964
  end
  object jTextView14: jTextView
    Left = 76
    Top = 218
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView13
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView14Click
    Id = 15784
  end
  object jTextView15: jTextView
    Left = 147
    Top = 218
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView14
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView15Click
    Id = 5912469
  end
  object jTextView16: jTextView
    Left = 218
    Top = 218
    Width = 61
    Height = 61
    MarginLeft = 5
    MarginTop = 245
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView15
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = [rpRight]
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpOneEighthOfParent
    Text = 'A'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrChartreuse
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    OnClick = jTextView16Click
    Id = 2866691
  end
  object jTextView17: jTextView
    Left = 98
    Top = 289
    Width = 103
    Height = 32
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 10
    MarginBottom = 5
    Visible = True
    Anchor = jTextView15
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpCenterHorizontal]
    LayoutParamWidth = lpWrapContent
    LayoutParamHeight = lpWrapContent
    Text = 'The Answer:'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrDefault
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    Id = 9929159
  end
  object jButton1: jButton
    Left = 82
    Top = 330
    Width = 136
    Height = 40
    MarginLeft = 2
    MarginTop = 4
    MarginRight = 2
    MarginBottom = 4
    Visible = True
    Anchor = jTextView17
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpCenterHorizontal]
    LayoutParamWidth = lpHalfOfParent
    LayoutParamHeight = lpWrapContent
    Text = 'Start'
    BackgroundColor = colbrDefault
    FontColor = colbrDefault
    FontSize = 0
    OnClick = jButton1Click
    Id = 4885599
  end
  object jButton2: jButton
    Left = 82
    Top = 378
    Width = 136
    Height = 40
    MarginLeft = 2
    MarginTop = 4
    MarginRight = 2
    MarginBottom = 4
    Visible = True
    Anchor = jButton1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpCenterHorizontal]
    LayoutParamWidth = lpHalfOfParent
    LayoutParamHeight = lpWrapContent
    Text = 'Surrender'
    BackgroundColor = colbrDefault
    FontColor = colbrDefault
    FontSize = 0
    OnClick = jButton2Click
    Id = 1744465
  end
  object jTextView18: jTextView
    Left = 216
    Top = 289
    Width = 61
    Height = 32
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jTextView17
    PosRelativeToAnchor = [raToRightOf, raAlignBaseline]
    PosRelativeToParent = []
    LayoutParamWidth = lpOneQuarterOfParent
    LayoutParamHeight = lpWrapContent
    Text = '00 : 00'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrNavajoWhite
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    Id = 0
  end
  object jSpinner1: jSpinner
    Left = 8
    Top = 432
    Width = 287
    Height = 40
    MarginLeft = 5
    MarginTop = 10
    MarginRight = 5
    MarginBottom = 10
    Visible = True
    Anchor = jButton2
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = []
    LayoutParamWidth = lpMatchParent
    LayoutParamHeight = lpWrapContent
    Items.Strings = (
      'Hi'
      'Hello'
      'Bye bye'
    )
    BackgroundColor = colbrDefault
    SelectedFontColor = colbrDefault
    DropListTextColor = colbrDefault
    DropListBackgroundColor = colbrDefault
    LastItemAsPrompt = False
    FontSize = 0
    Id = 7525840
  end
  object jTextView19: jTextView
    Left = 103
    Top = 487
    Width = 94
    Height = 32
    MarginLeft = 5
    MarginTop = 5
    MarginRight = 5
    MarginBottom = 5
    Visible = True
    Anchor = jSpinner1
    PosRelativeToAnchor = [raBelow]
    PosRelativeToParent = [rpCenterHorizontal]
    LayoutParamWidth = lpWrapContent
    LayoutParamHeight = lpWrapContent
    Text = 'Hello Baby'
    Alignment = taCenter
    Enabled = True
    BackgroundColor = colbrWhiteSmoke
    FontColor = colbrBlack
    FontSize = 20
    TextTypeFace = tfNormal
    Id = 0
  end
  object jTextFileManager1: jTextFileManager
    left = 40
    top = 152
  end
  object jTimer1: jTimer
    Enabled = False
    Interval = 1000
    OnTimer = jTimer1Timer
    left = 104
    top = 152
  end
end
« Last Edit: May 13, 2015, 05:03:10 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

m4u_hoahoctro

  • Full Member
  • ***
  • Posts: 160
Re: Android Module Wizard
« Reply #403 on: May 13, 2015, 08:08:59 am »
 :(

This is project modified:
https://drive.google.com/file/d/0Bx3SDL5wwBBYMVBCejdtZlRRX1k/view?usp=sharing

and it also has an error when I reopen project as below image
after updating new version of lamw, I get new error: you can see this video:https://drive.google.com/file/d/0Bx3SDL5wwBBYajRoTFJaM1poejQ/view?usp=sharing
« Last Edit: May 13, 2015, 03:34:19 pm by m4u_hoahoctro »

rx3.fireproof

  • New Member
  • *
  • Posts: 49
Re: Android Module Wizard
« Reply #404 on: May 13, 2015, 02:51:31 pm »
Hello Jmpessoa

My problem is not in the jspinner.  The problem in the jSqliteCursor.

This code works in  the procedure  AndroidModule1JNIPrompt  if rowCount<=5.


var
i, rowCount:integer;

jSqliteDataAccess1.Select('select * from mytable');

rowCount := jSqliteDataAccess1.Cursor.GetRowCount;

for i := 0 to rowCount - 1 do begin
      jSqliteDataAccess1.Cursor.MoveToPosition(i);
    //  jspinner1.Add(jSqliteDataAccess1.Cursor.GetValueAsString(2));
end;       



In other procedures is work  if rowCount near 100-150.

How to make that the code is worked?



With Respect

rx3.fireproof


 

TinyPortal © 2005-2018