Android Question Device connected to Designer

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
When I connect the Visual Designer to my Samsung Galaxy TabII I notice a difference between the behavior of the Designer and the actual App, when this latter is run. The attached pictures show that, while the Designer shows vertical positions and sizes in a way, the App has others. Which may be the reason?
 

Attachments

  • CAM01035.jpg
    CAM01035.jpg
    66.2 KB · Views: 122
  • CAM01034.jpg
    CAM01034.jpg
    60.9 KB · Views: 118

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Other worse examples. By the way I have put the vertical anchor to BOTTOM, for the two bottom buttons.
 

Attachments

  • CAM01037.jpg
    CAM01037.jpg
    69.5 KB · Views: 132
  • CAM01036.jpg
    CAM01036.jpg
    67.5 KB · Views: 118
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi. Thanks for answer. The problem seems quite general and not related to any project. Anyway, to eliminate this variable, I did a new project that I attach. Inside the zip file, there are also two pictures of what happens. There are two buttons on screen top and bottom corners. They are correctly managed by the designer, but not when the app runs. I attach here also the pictures. The device is a Samsung Galaxy 2 7.0. Thanks.
 

Attachments

  • TestDesigner.zip
    406.7 KB · Views: 117
  • CAM01038.jpg
    CAM01038.jpg
    72 KB · Views: 123
  • CAM01039.jpg
    CAM01039.jpg
    52.8 KB · Views: 124
Upvote 0

klaus

Expert
Licensed User
Longtime User
The problem is that in your layout Button2 is out of the screen and Scrollview1 is much bigger than the screen.
Attached a modified version with all views inside the screen and with anchors.
 

Attachments

  • TestDesigner1.zip
    7.7 KB · Views: 124
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Thanks for you help. Actually I was not asking to correct the position, but why the Designer shows a different position compared with App execution.
As a matter of fact, my idea as that, when the Designer is connected with the Device, the position of the Views should be directly definable. This seems not and this is the actual question.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
As a matter of fact, my idea as that, when the Designer is connected with the Device, the position of the Views should be directly definable.
Sorry, I don't really understand what you mean with this and what you really expect ?

In the Designer you have several options to the layout on different screens:

upload_2016-6-14_20-16-58.png


But anyway for me, if you develop a layout for a given screen size all the views must be positioned according to that size and inside the screen.
Then you can adjust the layout with AutoScaleRate, AutoScale and Anchors for different screen sizes.
 

Attachments

  • upload_2016-6-14_20-16-38.png
    upload_2016-6-14_20-16-38.png
    20.1 KB · Views: 133
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi. I insist just because I judge a little "interesting" the fact it is not clear what I mean. It is not a polemic, but I take it as a nice example of communication fault (from my side).
1) I connect a device to B4A with B4A-Bridge.
2) My device is not in the predefined list (that you reproduced).
3) I see an option "Match connected device"
4) Moreover, in the Designer, I see (and use) an option "Connect" under WYSIWYG
5) I expect that the surface of the Designer is now the surface of my Device
6) I put some views in some positions: they appear on the device in same position than on the Designer surface.
7) Even I can move them on the real device, to change their position.
8) But when the App runs .. the positions are not the same.
Is it not clear? Probably I miss some option in the code, or don't understand the meaning of the Designer options.
It is not, luckily, a big problem.
Thanks for your patience and attention.
Best regards
 
Upvote 0
Top