Recent

Author Topic: LAMW :Self.UpdateLayout error  (Read 5703 times)

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
LAMW :Self.UpdateLayout error
« on: April 13, 2017, 07:39:55 am »
Hi
i open "AppActionBarTabDemo1" program and i just (only) add "Self.UpdateLayout" in "procedure TAndroidModule1.AndroidModule1JNIPrompt" then i build it.
but when i run it , it hanged and close?
what?
.
also when i add "Self.UpdateLayout" in"procedure TAndroidModule1.AndroidModule1Rotate".it hanged!?
help

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW :Self.UpdateLayout error
« Reply #1 on: April 13, 2017, 08:28:54 am »


It is not intended to be a finished product.....
[In fact,  meets only the concept/tutorial one wants to demonstrate .... ]
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #2 on: April 13, 2017, 09:45:47 am »
!?!
i buidl a project and put an actionbar and some button in panel.
when i rotate my phone the width of all button not changed.

mr "jmpessoa" siad in here that we should add "jPanel12.ResetAllRules;" and "Self.UpdateLayout;"

but it dosen't work
how can i fix it ?
« Last Edit: April 13, 2017, 12:47:29 pm by majid.ebru »

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #3 on: April 13, 2017, 12:39:49 pm »
when i put a "jActionBarTab1" in form and rotate my phone  ,but  "Self.UpdateLayout" code dosen't work correctly and app hanged?!?! :o :o
.
in an other project ,i put "jscrollview" and some "jbutton" then rotate my phone but "Self.UpdateLayout" code dosen't work correctly ?!?! :o :o
.
i think this is a bug?!?! :-X
.
can you check it,please :'(

« Last Edit: April 13, 2017, 12:59:59 pm by majid.ebru »

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW :Self.UpdateLayout error
« Reply #4 on: April 13, 2017, 11:19:19 pm »

Quote
.....i think this is a bug?!?!

Yes. it's a possibility!

but,  you can learn more about rotate from "demos/GUI" folder example:

"AppPanelRotateDemo1"  and

"AppCameraDemo"




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

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #5 on: April 14, 2017, 02:19:19 pm »
ok
i read and build "AppPanelRotateDemo1"  and "AppCameraDemo".
but they are very Primary and they just have 2 element(jPanel) for rotate ?!?
.
in my app i have many jPanels and jScrollview and jtextview and ..... .

when i use many elements , the rotate proceduer dose'nt work corectlly  .


jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW :Self.UpdateLayout error
« Reply #6 on: April 14, 2017, 04:33:21 pm »

Code: Pascal  [Select][+][-]
  1. .... i have many jPanels
  2.  

Please, send me a draft [just panels!]
with vertical and horizontal layout you need ....
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #7 on: April 17, 2017, 10:29:02 am »
Hi
.
How can i Implementation and Layout and design samples ?
.
is layout of sample 2 true?

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #8 on: April 17, 2017, 10:39:17 am »
For Sample 2 :


Code: Pascal  [Select][+][-]
  1. .
  2. .
  3. jPanel2.PosRelativeToParent := [rpLeft];
  4. .
  5. .
  6.  
.
.
.
How can i aling Top jPanel3??
Code: Pascal  [Select][+][-]
  1. .
  2. .
  3. jPanel3.Anchor := jPanel2;
  4. jPanel3.PosRelativeToAnchor := [raToRightOf,raAlignBaseline, ?? ] //How can i aling Top jPanel3??
  5. .
  6. .
  7.  
.
.

Code: Pascal  [Select][+][-]
  1. .
  2. .
  3. jPanel4.Anchor := jPanel3;
  4. jPanel4.PosRelativeToAnchor := [raBelow];
  5. .
  6. .
  7. jPanel5.Anchor := jPanel4;
  8. jPanel5.PosRelativeToAnchor := [raBelow];
  9. .
  10. .
  11. jPanel6.Anchor := jPanel5;
  12. jPanel6.PosRelativeToAnchor := [raBelow];
  13. .
  14.  

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #9 on: April 17, 2017, 10:40:43 am »
How can i layout and aling sample 5?
.
red area layout and aling ?!?
.
yellow ares is very important!?!
.
.
---------------------------------------------------------------------------------------------
How can i layout and aling sample 3?
.
.
---------------------------------------------------------------------------------------------
Sample 1 is very important becuease when i rotate my phone,then all layout changed?!?!
.
.

Thank you alot :-* :-* :-* :-*
« Last Edit: April 17, 2017, 10:43:01 am by majid.ebru »

majid.ebru

  • Sr. Member
  • ****
  • Posts: 494
Re: LAMW :Self.UpdateLayout error
« Reply #10 on: April 20, 2017, 02:57:51 pm »
Hi
doesn't any idea? :o

jmpessoa

  • Hero Member
  • *****
  • Posts: 2297
Re: LAMW :Self.UpdateLayout error
« Reply #11 on: April 21, 2017, 02:48:45 am »

What about a new logic design? Many jPanels Implies a very difficult programming logic!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018