Recent

Author Topic: Testing-3 LAMW  (Read 754 times)

shyub

  • Jr. Member
  • **
  • Posts: 82
Testing-3 LAMW
« on: March 17, 2021, 02:13:42 pm »
Hello!
I don't know if this is the case with me, or is it typical of LAMW?
If I anchor the panel or buttons to the bottom edge of the form or panel (PosRelativeToParent / rpBottom property), then when the size of the form or button anchors are resized, the bottom edge of the panel "runs away" far down. It can be restored later only by deleting buttons and panels.
That is how it should be:

shyub

  • Jr. Member
  • **
  • Posts: 82
Re: Testing-3 LAMW
« Reply #1 on: March 17, 2021, 02:15:55 pm »
This happens periodically:

shyub

  • Jr. Member
  • **
  • Posts: 82
Re: Testing-3 LAMW
« Reply #2 on: March 17, 2021, 02:17:23 pm »
Source:

jmpessoa

  • Hero Member
  • *****
  • Posts: 1801
Re: Testing-3 LAMW
« Reply #3 on: March 17, 2021, 05:52:10 pm »

Maybe can improve your "user experience"....

Using a single Lazarus  IDE [Docked Desktop]:


AnchorDockingDsgn package   +
sparta_DockedFormEditor package (or some [new] other...)
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

shyub

  • Jr. Member
  • **
  • Posts: 82
Re: Testing-3 LAMW
« Reply #4 on: March 18, 2021, 12:46:47 pm »
jmpessoa, thanks for the advice!
Buttons no longer "run away" when you accidentally change the size of the form (the size can now be changed only deliberately and it is not difficult to return to the original one).
However, it was not possible to figure out the main issue ...
How to use jImageBtn buttons so that the interface looks about the same at different screen resolutions.
For each permission, store your pictures in the program?

jmpessoa

  • Hero Member
  • *****
  • Posts: 1801
Re: Testing-3 LAMW
« Reply #5 on: March 18, 2021, 06:06:35 pm »
Quote
How to use jImageBtn buttons so that the interface looks about the same at different screen resolutions.

This is an Android issue..... You need put  one image for each resolution!
This is the meaning of  the project   "...res/drawable-***"  folders!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

shyub

  • Jr. Member
  • **
  • Posts: 82
Re: Testing-3 LAMW
« Reply #6 on: March 18, 2021, 08:21:23 pm »
Thank!

shyub

  • Jr. Member
  • **
  • Posts: 82
Re: Testing-3 LAMW
« Reply #7 on: March 24, 2021, 01:56:02 pm »
I place images in drawable-hdpi ... drawable-xxhdpi folders, but:
1. When installing the jImageBtn1 buttons on the form and when connecting a picture, the button increases in size, although I set the screen size to the corresponding hdpi.
2. When building the project, an error constantly appears: "Fatal: [Exception] Failed: Cannot build APK !."
3. How do I specify for which screen mode the build is being performed?
4. Could you give an example with jImageBtn1 buttons, the images on which change depending on the screen resolution.
Thank.

shyub

  • Jr. Member
  • **
  • Posts: 82
Re: Testing-3 LAMW
« Reply #8 on: March 25, 2021, 09:51:54 am »
I found my error, the project is starting.
It was necessary to not just copy the pictures into "drawable-hdpi ... drawable-xxhdpi", but use the "[LAMW] Android Module Wizard / Use Import Image-Picture".
I attach a picture of how the button looks at different screen resolutions. Happened!

However, when visually designing jImageBtn1 is always 72 x 72 pix and it is very difficult to design an application. It would be nice if the size of the ImageBtn buttons could be resized when designing, this would make it easier to design the application.

How to proceed so that at the development stage you can see how the application will look on a real device (whether to make a button 100 x 100 pix, or 300 x 300 pix)?

ADiV

  • Jr. Member
  • **
  • Posts: 76
    • ADiV Software
Re: Testing-3 LAMW
« Reply #9 on: March 26, 2021, 08:20:15 pm »
Copy the image you want to "drawable" only and android will adjust the resolution of the image.

I use this for example in my app, for google play: https://play.google.com/store/apps/details?id=tr3e.MarkListFree
« Last Edit: March 26, 2021, 08:25:45 pm by ADiV »

 

TinyPortal © 2005-2018