Android Question Designer Scripts

Discussion in 'Android Questions' started by PABLO2013, Apr 1, 2015.

  1. PABLO2013

    PABLO2013 Active Member Licensed User

    regards
    I want to know how I can improve the appearance of my application ... the problem is that the layout appears slightly below the top = 0 (blue ) position , the texts of the bar are very large and the menu does not respect the scale I 'm using the percentages % x % and...it is in sansumg Note 5

    In this designer Scripts as I indicate the position of the layout or activity....

    thx
     

    Attached Files:

  2. klaus

    klaus Expert Licensed User

    Without seeing the DesignerScript code it's difficult to give a concrete advice.
    Can you post a small project showing the problem.
     
    NJDude likes this.
  3. PABLO2013

    PABLO2013 Active Member Licensed User

    TKS, Klaus

    I HAVE READ ALL FORUMS BUT ARE NOT VERY CLEAR .... WHY B4A NOT MAKE THIS automatically...

    MY CODE IS IN %, I DID WITH A SMALL FORMULA THAT GIVES ME THE POSITION IN WHICH INITIALLY LOCATE THE VIEWS (TOP, LEFT, ....)

    WHEN SENDING THE ALTERNATIVE 320x480, scale = 1 TO (SENT UI CLOUD) DOES MORE OR LESS AS I DESIGN, THE PROBLEM IS THAT WHEN USING REAL DEVICES LIKE (Samsung I9205 Galaxy Mega OR TABLET 10 "Samsung) THE TEXT IN THE BAR IS VERY BIG ... AND Layout IS VERY DOWN





    escalatexto=0.5 I WAS TRYING TO BE ABLE TO SEE IN DIFFERENT DEVICES
    escalavert=1 THIS IS NOT USED , 1
    escalahor=1 THIS IS NOT USED , 1
    separacionvert=1 THIS IS NOT USED , 1
    separacionhor=1 THIS IS NOT USED , 1
    espaciovert=0 THIS IS NOT USED , 0
    espaciohor=0 THIS IS NOT USED , 0

    '''''''''''''''''''''''''''''''''''''''''''''
    deltatexto=100%x/320dip I WAS TRYING TO BE ABLE TO SEE IN DIFFERENT DEVICES
    '''''''''''''''''''''''''''''''''''''''''''''
    delta = ((100%x + 100%y) / (320dip +480dip) - 1)
    rate=0.3
    escala=1 '+delta*rate THIS IS NOT USED,1
    '''''''''''''''''''''''''''''''''''''''''''''
    AutoScaleRate(0.3)
    AutoScaleAll
    '''''''''''''''''''''''''''''''''''''''''''''


    'Activity.left=0dip I THOUGHT THIS COULD BE .......
    'Activity.Top=0dip I THOUGHT THIS COULD BE.........

    Button13.left=28.6666666666667%x*escala*escalahor*separacionhor+espaciohor
    Button13.top=76.4130434782609%y*escala*escalavert*separacionvert+espaciovert
    Button13.width=16%x*escala*escalahor
    Button13.height=4.34782608695652%y*escala*escalavert
    Button13.TextSize=12*deltatexto*escalatexto

    Panel6.left=1%x*escala*escalahor*separacionhor+espaciohor
    Panel6.top=2.28260869565217%y*escala*escalavert*separacionvert+espaciovert
    Panel6.width=48.3333333333333%x*escala*escalahor
    Panel6.height=28.695652173913%y*escala*escalavert

    LIKE FOR THE REST OF VIEWS

    ...................................................
    THIS IS THE BAR

    Activity.LoadLayout("COORDENADAS")

    bar.Initialize("bar")

    bar.NavigationMode = bar.NAVIGATION_MODE_TABS

    bar.Subtitle = "TRANSFORMACION LAMBERT-CRTM05"

    Activity.Title = "CRTM05"

    Activity.AddMenuItem3( "MAPA" , "MAPA" , Null,True )
    Activity.AddMenuItem3( "GUARDAR" , "GUARDAR" , Null,True )
    Activity.AddMenuItem3( "BORRAR" , "BORRAR" , Null,True )
    Activity.AddMenuItem3( "ACERCA" , "ACERCA" , Null,True )


    TKS
     
  4. DonManfred

    DonManfred Expert Licensed User

    Use Code tags when posting code!
    Search the forum if you dont know how
     
    lemonisdead likes this.
  5. klaus

    klaus Expert Licensed User

    It would be much easier for us to see what happens if you posted a small project showing the problem !
    I don't understand your logic:
    - you use formulas delta / rate / escala (which is the formula of AutoScale) ?
    - then you use AutoScaleRate(0.3) and AutoScaleAll, which modifies all positions and sizes ?
    - and finally, you use Button13.height=4.34782608695652%y*escala*escalavert, if you want %y why do you scale it again ?
    This is NOT the case see the line above !

    Did you have a look at the AutoScale module ?
    Did you read the relevant chapters the Beginner's Gude ?
     
    Last edited: Apr 1, 2015
    lemonisdead and NJDude like this.
  6. PABLO2013

    PABLO2013 Active Member Licensed User

    GREETINGS
    I ONLY AS USED % ,AutoScale All, AutoRateScale, THE REST IN THE FORMULA is 1 Or 0 (DO NOTHING) .... only the text size that has no logic (trial and error) because it was what worked, yes i look the BASIC GUIDE TO RESPECT AND FORUMS
    tks
     

    Attached Files:

  7. PABLO2013

    PABLO2013 Active Member Licensed User

    I spent revising the rest but I see that the issue of device sizes is complicated ... there will be another way ...
     
  8. klaus

    klaus Expert Licensed User

    The problem is the StdActionBar !
    Depending on the orientation it takes extra space which is not considered in 100%y.
    For StdActionBar you must add a panel for each page and load the layouts on these Panels.
    When you load a layout into a Panel, 100%y correspond to the panel height and not to the Activity height.

    You should read the ActionBar / Sliding Pages tutorial.
    I had to do it too, because I had never used the StdActionBar.
    Attached your project modified. You should adapt it according to the tutorial example program.
     

    Attached Files:

    lemonisdead, Erel and NJDude like this.
  9. PABLO2013

    PABLO2013 Active Member Licensed User

    I HAVE NO WORDS TO THANK SO MUCH KINDNESS
    MY ENGLISH IS POOR , THANK YOU
     
    Erel likes this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice