Java version for B4A2.20

Theera

Well-Known Member
Licensed User
Longtime User
Hi Erel,
I'm sorry to disturb again. I'm just using B4a v2.20. Whenever I compile the old widget,it has error. I don't know that I might download both of jdk1.6 and jdk1.7 to use yes or no.I need to success creation my library finish too. You guided me to jdk1.6 for Eclipse program.

Best Regards
Theera
:eek:
 
Last edited:

Theera

Well-Known Member
Licensed User
Longtime User
new bigger picture

Hi Informatix ,
Here you are below. I'm sorry ,I 'm not good at English.
P.S. It has error only by designer ,but by coding is well done. I don't know that about I used setLiftandRight in script before.
Best Regards
Theera
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
How to set autoscalerate(0)

In your script, you call SetScaleRate. It is "AutoScaleRate".

Hi Informatix,
I have done following your guide.I need to set scale rate with manual(not auto),In my script( see the picture) ,I set is autoscalerate(0). Why does not change ?

Best Regards
Theera
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Why does not change ?
What do you mean with this ?

In your example you set the views with %x and %y values.
Changing AutoScaleRate will not change anything.

The easiest way to adapt a layout is simply use.
AutoScaleAll

In that case the rate value is 0.3 by default.
If you want to change the rate value (to 0,4 for example) you must change it with:
AutoScaleRate(0.4)
AutoScaleAll

If you don't want to autoscale all views you can use following code:
AutoScaleRate(0.4) ' only if you want to change the rate value
AutoScale(EditTex1)
AutoScale(EditTex2)
AutoScale(Label1)
AutoScale(Label2)
etc.

Best regards.
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Everything is explained here and here.

Hi Informatix,
Please give me up,I'm understand English 5-10%. I will be understand,if I see the really example.

Best Regards
Theera
:sign0013:
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Please to understand me.

Hi Klaus,
Thank you Klaus for help me again and again.
Due to the old widget,I used %x and %y to fix scale all of objects. I need to save my strategy. I don't use the new feather(AutoScaleAll). I need to campare between my strategy and Erel's new feather. Of course, I still don't understand "AutoScaleRate and AutoScale" AutoScale(button1) is as same as button1.setLeftandRight(%?x,%?y)? and ScaleRate ,I've never used it before. I need to see the Examples more.

Best Regards
Theera
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Hi Klaus,
Please to see my program. Why does it have error as same as post #3 ?
Please help me.
Best Regards
Theera
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
Why does it have error as same as post #3 ?
I don't know what's wrong. The program works fine on my devices !
Are you sure that you don't have old standard libraries in the Additional Libraries folder?
I still don't understand "AutoScaleRate and AutoScale" AutoScale(button1) is as same as button1.setLeftandRight(%?x,%?y)? and ScaleRate
AutoSacle is NOT the same as %x, and %y.
If you use %x and %y the views are stretched according to the screen size.
AutoScale uses a formula to calculate the stretching factor (scale factor).
Formula:
B4X:
delta = ((100%x + 100%y) / (320dip + 430dip) - 1)
rate = 0.5 'value between 0 to 1.
scale = 1 + rate * delta
AutoScaleRate(0.5) sets the rate value in above formula. A value of 1 is equivalent to %x and %y.
AutoScale(Button1) is equivalent to
B4X:
Button1.Width = Button1.Width * scale
Button1.Height = Button1.Height * scale
Button1.Left = Button1.Left * scale
Button1.Top = Button1.Top * scale
Button1.TextSize = Button1.TextSize * scale
AutoScaleAll applies the scaling to all views in the layout.

Best regards.
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Should I set AutoScaleRate to be?

Hi Klaus,
The first question,you are correct. I've copied old libraries folder overwrite the new one before. But I need ask you addition,I should set autoscalerate to be ?,because it 's very begin 0 to 1 . autoscalerate=0.5 or others? If I set autoscaleall,I must set autoscalerate yes or no? I see some threads,he set in his scripts belows as
AutoScaleRate(0.5)
AutoScaleAll

P.S. Thank for kind of you again please.
Best Regards
Theera
 
Upvote 0

Yuls

Member
Licensed User
Longtime User
No works AutoScale

Hi. I've v2.3 and AutoScale is not a valid keyword. Is needed add a library?
Any new keyword to scaling works.
 
Upvote 0
Top