Petition. I want to try.

An Schi

Well-Known Member
Licensed User
I like the idea and i think i would sign a petition. But your link contains to much italian language for me.
Couldn't this be done in a more international way (english) or even on a platform which allows localization?
 

LucaMs

Expert
Licensed User
Longtime User
I like the idea and i think i would sign a petition. But your link contains to much italian language for me.
Couldn't this be done in a more international way (english) or even on a platform which allows localization?
I thought, I was hoping it was an international site and that the petition was also visible on English pages.
https://www.google.it/search?q=site:activism.com&oq=site:activism.com&gs_l=psy-ab.3...43704.45039.0.45396.12.8.0.0.0.0.161.616.6j1.7.0....0...1.1.64.psy-ab..8.0.0.0pplHhpIRL4

[BTW, my example is inverted, between TV and mobile devices but the concept is the same]
 

canalrun

Well-Known Member
Licensed User
Longtime User
Adapting a layout for different form factor and different resolution devices can be a problem.

Back when B4A was very young – long before designer scripts and some other IDE enhancements, I adapted a strategy of dynamically repositioning all controls of a layout within code. This sounds daunting, and the first few times it's a little tricky, but it's really not that bad once you get used to it.

I put groups of controls (buttons, radio buttons, etc.) in panels. I then resize and reposition the panels as needed to fit the Activity width and height. I might make a generalized layout plan like: I want this panel to be on the top left 40% of the screen width and 60% of the height in a landscape orientation. I might want the panel of buttons to be along the bottom 100% width and 20% height …

I then evenly space the individual controls within each panel.

Sometimes I need to do a test to make sure there is enough blank space between each panel. I might adjust the panel size and then do another repositioning and free space test.

This strategy accounts for screen diffferences, it also works well for adapting to tablets. In the designer I usually just create one layout for landscape and one for portrait orientatiion for the single resolution of 600 x 800.

Barry.
 

LucaMs

Expert
Licensed User
Longtime User
Open youtube and resize the window. The layout adapts to whatever size you throw at it. That's the example we should follow.
I don't know what you mean.

A youtube video, like a TV show, has its own format and if you want to see it without deformation, the player must have the same format or you will see black bands at the sides, just as if you watched a 4:3 movie on a 16:9 TV.
 

wonder

Expert
Licensed User
Longtime User
@LucaMs, again, I meant the website, of if you prefer, the webpage layout, not the video player.
Meaning the video thumbnails on the right side, the video player and the comments below, everything is shifted and reshaped in real-time, as you resize the window. Amazing work, in my opinion.
 

LucaMs

Expert
Licensed User
Longtime User
As you wrote... "Amazing work", which means also "hard work". If all devices had a standard format it (and all ours) would have been an easy work and you would have more time for other parts of your software.
 
Last edited:
Cookies are required to use this site. You must accept them to continue using the site. Learn more…