|
| WM 19 Android - anchoring and stretching to fit screen |
| Iniciado por guest, 05,dic. 2014 12:01 - 6 respuestas |
| |
| | | |
|
| |
| Publicado el 05,diciembre 2014 - 12:01 |
Hi All,
I am starting to understand the relationship between screen resolution and dpi, and the use of anchoring. I have recently started using WM19 as a step up from Droiddb as I needed the extra functions. In DDB, the program reads the screen size and resolution and sets a suitable size. When the programme is run on any tablet of a different size, the screen is automatically resized (by Android), so if you develop for a 320x240 screen and ran it on a 1280x800 screen, the controls would proportionally stretch to fill the width, leaving a small blank space at the bottom because of the proportion difference.
I have this screen in Windev for a 320x240 screen (attached), and I want to run it on a 1280x800 screen. I can't see how to use anchoring to achieve this, or any other way at the moment. Is there an answer other than formatting for different screens?
Thanks [attachment 1261 phoneappp.JPG] |
| |
| |
| | | |
|
| | |
| |
| Publicado el 05,diciembre 2014 - 20:47 |
Hi.
The automatic adjust of layouts from a phone to a tablet size never will give you the optimum results. It will pixelate the images, etc.
In WM19 you can define diferent layouts for phone and tablet, and share the same code.
This allow you use little images for phone and beter and greater images for tablet.
I use other diferent tools to build apps, and this is the better practice.
Rubén |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,diciembre 2014 - 10:33 |
Thanks Rubén for your comments
I am finding there is no automatic layout, good or bad. The form uses text and svg drawings only so there shouldn't be a problem with pixelation, and I am trying to design one form for use on phones only, with similar proportions but different resolutions, rather than for phone and tablet. I understand the issue with raster images, but not buttons, vector images etc.
On page 14 of the 'Concepts' book, it says, "The windows created with Windev Mobile for the Android applications automatically adapt to the screen resolutions at runtime." This is what I want to achieve - it is not anchoring, it is adapting to the screen.
Could it be because there is more than one screen size in the test app?
Thanks
Pete |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,diciembre 2014 - 12:14 |
Hi Rubén, Quote
I use other diferent tools to build apps Could you tell us a bit more about that? It would be interesting if you also use WM and could give us some comparison and pros/cons of the different tools. |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,diciembre 2014 - 13:52 |
Hi.
Im using WM19, i like a lot of, but it has a lot of limitations when i must use "standard" jobs: encryption, json, etc. And the PcSoft policy of a year update it isn't correct to follow the current devices evolution.
Basic4android: designer is limited but it has an incredible library collection. You can use a java library building a wrapper. The IDE then can use this new java library. Library Samples: BLE, WifiDirect, Geolocation, Maps, draw, communications, ... It's very easy use it. And the better thing, you can debug your app directly on the real device. Various versions in a year, great support and a very low price.
I use also MyEclipse with Phonegap when i need use a javascript resource.
Rubén |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,diciembre 2014 - 19:24 |
Hi Pete,
yes you ARE looking for the anchoring system... In windev, the "Anchoring" concept includes stretching (increasing size) either horizontally or vertically or both, according to the window size. If you use a window that is full screen, you get exactly what you are asking for
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 06,diciembre 2014 - 19:59 |
Hi Fabrice,
I have tried every combination of anchoring I can see. If I put on a map control to fill the form and anchor it to expand width and height, no problem, it expands.
But when I put on multiple controls they do not expand proportionally. I thought using a looper control might be the answer.
I have attached a simple form with a looper and 3 buttons. I can get the buttons to move to the bottom, centre and right, but they do not increase in size to make them proportionate. The looper control expands to the right, but not downwards, and the text does not change in size.
What anchors do I need to put to these controls so that they expand to fill the screen proportionally please?
Thanks again
Pete [attachment 1265 screens.jpg] |
| |
| |
| | | |
|
| | | | |
| | |
|