Android Question [Solved] ACToolBarLight obscuring ImageView. How to resolve?

Discussion in 'Android Questions' started by Batman_, Apr 18, 2019.

  1. Batman_

    Batman_ Member Licensed User

    I have a layout with an ACToolBarLight at the top and an B4X ImageViewbelow this.

    When the layout loads the ACToolBarLight is obscuring the B4X ImageView (see link).

    In Designer view I have tried this:
    Code:
    imageViewTop.Top=0%y
    imageViewTop.Left=
    0%x
    imageViewTop.Right=
    100%x
    and also this:
    Code:
    imageViewTop.Top=ACToolBarLight1.Bottom
    imageViewTop.Left=
    0%x
    imageViewTop.Right=
    100%x
    with no positive outcome. Note: I have applied the "AutoScaleAll" both on or off with no positive effect.

    My anchor settings and layout for the ImageView are (use link).

    I set the B4X imageview settings with the following code:
    Code:
    imageViewTop.SetBitmap(xui.LoadBitmapResize(File.DirAssets, Pics(Counter),imageViewTop.Width, imageViewTop.Height, False))    'False removes KeepAspectRatio
    Any assistance appreciated.
     

    Attached Files:

    Last edited: Apr 18, 2019
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. Brandsum

    Brandsum Well-Known Member Licensed User

    imageViewTop.Top=ACToolBarLight1.Bottom
    Code:
    imageViewTop.Top=ACToolBarLight1.Height
    imageViewTop.Height=
    100%y - ACToolBarLight1.Height - imageViewBottom.Height
     
  4. Batman_

    Batman_ Member Licensed User

    Hi.

    To help any future user who has a similar issue, attached is how I set the anchors (see attachment).

    Here is the code I used in Designer Scripts:
    Code:
    imageViewTop.SetTopAndBottom(ACToolBarLight1.Bottom, 100%y-imageViewBottom.Height)
    imageViewTop.Width=
    100%x
    imageViewBottom.Width=
    100%x
    Regards.
     

    Attached Files:

  5. Erel

    Erel Administrator Staff Member Licensed User

    The designer script is not needed. Anchors will be enough here.
     
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