Android Question Why are not acceptable

Discussion in 'Android Questions' started by Enthousiastic, Jul 13, 2015.

  1. Enthousiastic

    Enthousiastic Active Member Licensed User

    Hello , i wrote this in gloabal variables for label1 :

    Dim lbl1Left As Float : lbl1Left=3%x
    Dim lbl1Top As Float : lbl1Top=6%x
    Dim lbl1Width As Float : lbl1Width=23%x
    Dim lbl1Height As Float : lbl1Height=9%x


    Why are not acceptable ?

    What shall i write instead ?

    Many thanks Enthousiastic
     
  2. MaFu

    MaFu Well-Known Member Licensed User

    What error did you get?
     
  3. sorex

    sorex Expert Licensed User

    did you try replaceing the : with a = and remove the "lbl1Left=" aswell ?

    I don't think it's best practice to put real code there.
     
  4. Enthousiastic

    Enthousiastic Active Member Licensed User

    cannot find symbol
    _lbl1left = (float) (anywheresoftware.b4a.keywords.Common.PerXToCurrent((float) (3),_ba));
     
  5. sorex

    sorex Expert Licensed User

    I'd move that to the _Create part instead.

    I don't know how java declares it's variable and if it then already know the screen dimension.
     
  6. NJDude

    NJDude Expert Licensed User

    Those values should be INT not FLOAT.
     
    thedesolatesoul likes this.
Loading...