T Toley Active Member Licensed User Longtime User Jan 21, 2014 #1 I know there are some changes in the AutoscaleAll with the new version. But it don't seems to work at all here. Our older tablet was a 800x600 one and now we have to change for a 1024x768 one. On the older versions all we have to do in the designer script is : Code: Copy AutoScaleRate(0.21) AutoScaleAll And then we were full screen on the new tablet. But now AutoscaleAll seems to do nothing.
I know there are some changes in the AutoscaleAll with the new version. But it don't seems to work at all here. Our older tablet was a 800x600 one and now we have to change for a 1024x768 one. On the older versions all we have to do in the designer script is : Code: Copy AutoScaleRate(0.21) AutoScaleAll And then we were full screen on the new tablet. But now AutoscaleAll seems to do nothing.
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2014 #2 What is the variant dimensions? Upvote 0
T Toley Active Member Licensed User Longtime User Jan 22, 2014 #3 800x560 (because the taskbar was removed on the original tablet) and 1024x768 (for the new tablet) The older tablet run android 2.2 while the new run 4.0. Upvote 0
800x560 (because the taskbar was removed on the original tablet) and 1024x768 (for the new tablet) The older tablet run android 2.2 while the new run 4.0.
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2014 #4 AutoScaleAll will not have any effect if the variant is in the same size of the device. The purpose of AutoScaleAll is to scale the interface when the variant doesn't match the actual screen size. Upvote 0
AutoScaleAll will not have any effect if the variant is in the same size of the device. The purpose of AutoScaleAll is to scale the interface when the variant doesn't match the actual screen size.
T Toley Active Member Licensed User Longtime User Jan 22, 2014 #5 Ok if I understand well I have to remove the 1024x768 variant right ? This is what I did but it did not rescale like I think it should do by only add AutoScalAll. I have to add AutoScaleRate(1.0) to get a correct scale on the 1024x768 tablet. In my case I am lucky I know the new size of the new tablet and can make adjustment. I would think AutoScaleRate(1.0) was the default value. Upvote 0
Ok if I understand well I have to remove the 1024x768 variant right ? This is what I did but it did not rescale like I think it should do by only add AutoScalAll. I have to add AutoScaleRate(1.0) to get a correct scale on the 1024x768 tablet. In my case I am lucky I know the new size of the new tablet and can make adjustment. I would think AutoScaleRate(1.0) was the default value.
Erel B4X founder Staff member Licensed User Longtime User Jan 22, 2014 #6 It depends on what you are trying to do. I recommend you to use only one or two variants. The default value of AutoScaleAll is 0.3. I don't recommend you to set it to a value higher than 0.5. You should instead use the anchoring feature / designer script to scale the interface. Upvote 0
It depends on what you are trying to do. I recommend you to use only one or two variants. The default value of AutoScaleAll is 0.3. I don't recommend you to set it to a value higher than 0.5. You should instead use the anchoring feature / designer script to scale the interface.
margret Well-Known Member Licensed User Longtime User Feb 8, 2014 #7 In 3.2, I have a device with 1440 x 816 with a DPI of 1.5. The AutoScaleAll does not work at all. So, I deleted this variant and created a new one with 1400 x 800 and AutoScaleAll still will not work. I have also added the code: Code: Copy Dim jo As Java Object jo.InitializeStatic("java.lang.System").RunMethod("setProperty", Array As Object("autoscaleall_old_behaviour", "true")) I have over 75 screens and some with 100+ objects and do not want to have to change them all to work in 3.2. In version 3.0, they all run and work as expected on any device I have used them on. Is there other samples or threads in the forum that I have missed? Upvote 0
In 3.2, I have a device with 1440 x 816 with a DPI of 1.5. The AutoScaleAll does not work at all. So, I deleted this variant and created a new one with 1400 x 800 and AutoScaleAll still will not work. I have also added the code: Code: Copy Dim jo As Java Object jo.InitializeStatic("java.lang.System").RunMethod("setProperty", Array As Object("autoscaleall_old_behaviour", "true")) I have over 75 screens and some with 100+ objects and do not want to have to change them all to work in 3.2. In version 3.0, they all run and work as expected on any device I have used them on. Is there other samples or threads in the forum that I have missed?
Erel B4X founder Staff member Licensed User Longtime User Feb 9, 2014 #8 AutoScaleAll isn't supposed to do anything if the loaded variant exactly matches the device layout. However if you set this property as you did then AutoScallAll behaves exactly as in v3.00, which means that it is always related to the "standard" variant and not to the current one. Upvote 0
AutoScaleAll isn't supposed to do anything if the loaded variant exactly matches the device layout. However if you set this property as you did then AutoScallAll behaves exactly as in v3.00, which means that it is always related to the "standard" variant and not to the current one.
margret Well-Known Member Licensed User Longtime User Feb 10, 2014 #9 Is this only when the program runs and not in the designer? I did add the code and in the designer when I run the script, there is no change in the screen. In 3.0, running the script with the same layout shows the screen scale change. So, the added code must be to support runtime and not the designer, is this correct? Upvote 0
Is this only when the program runs and not in the designer? I did add the code and in the designer when I run the script, there is no change in the screen. In 3.0, running the script with the same layout shows the screen scale change. So, the added code must be to support runtime and not the designer, is this correct?
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2014 #10 You are correct. The code above will only affect the runtime behavior. Note that the old behavior was not really "correct" as it treated all variants as if these variants are 320x480,scale=1.0. Upvote 0
You are correct. The code above will only affect the runtime behavior. Note that the old behavior was not really "correct" as it treated all variants as if these variants are 320x480,scale=1.0.
B belangelot New Member Licensed User Longtime User Feb 10, 2014 #11 I have the same problem than Margret in version 3.2. The designer does not display changes with AutoScallAll. Individuals scripts do not affect the display. Effectively with older versions we saw in the designer when the scripts run (with all kinds of variant). It was easier to control. Basic variants (320x480 smartphone), with AutoScallAll, could be expanded to 1280x960 for a tablet. In this way applications can run on all kinds of screens. Now I can't get this result. I used the designer correctly ... I think (because all were OK before) Is AutoScallAll allows this functinnality to adapt the layouts in version 3.2? Maybe I missed a step. Thank you to clarify this issue. Upvote 0
I have the same problem than Margret in version 3.2. The designer does not display changes with AutoScallAll. Individuals scripts do not affect the display. Effectively with older versions we saw in the designer when the scripts run (with all kinds of variant). It was easier to control. Basic variants (320x480 smartphone), with AutoScallAll, could be expanded to 1280x960 for a tablet. In this way applications can run on all kinds of screens. Now I can't get this result. I used the designer correctly ... I think (because all were OK before) Is AutoScallAll allows this functinnality to adapt the layouts in version 3.2? Maybe I missed a step. Thank you to clarify this issue.
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2014 #12 See this link: http://www.b4x.com/android/forum/threads/basic4android-v3-20-is-released.36690/#post-215889 Upvote 0
See this link: http://www.b4x.com/android/forum/threads/basic4android-v3-20-is-released.36690/#post-215889
klaus Expert Licensed User Longtime User Feb 10, 2014 #13 I think it would be interesting to have in the Designer Scripts a function allowing to set the 'old' behaviour. Upvote 0
I think it would be interesting to have in the Designer Scripts a function allowing to set the 'old' behaviour.
Erel B4X founder Staff member Licensed User Longtime User Feb 10, 2014 #14 I think that you should only use the old behavior with current projects that relied on this behavior. The old behavior was wrong and confusing. The purpose of AutoScaleAll is to take the layout you designed and scale it based on the actual device size. If you designed a 7'' layout and you run it on a 7'' device then the layout should not be affected by AutoScaleAll. Upvote 0
I think that you should only use the old behavior with current projects that relied on this behavior. The old behavior was wrong and confusing. The purpose of AutoScaleAll is to take the layout you designed and scale it based on the actual device size. If you designed a 7'' layout and you run it on a 7'' device then the layout should not be affected by AutoScaleAll.