Android Question Image display on all views

Discussion in 'Android Questions' started by daniedb, May 29, 2015.

  1. daniedb

    daniedb Active Member Licensed User

    This might be a stupid/simple question, but I cannot get it to work.

    I want to display 2 images on all views without adding that image to every layout
    eg: in timer embed I will have something like:
    Code:
    if InstToUSe=False
      active_img.Bitmap=
    LoadBitmap(File.DirAssets,"rdot.png")
    else
      active_img.Bitmap=
    LoadBitmap(File.DirAssets,"gdot.png")
    end if
    And Update all views when opened with that image
    I try to use the same Variable Name on all views, but don't seems to work

    Thanks
    Danie
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Not sure that I understand. Why do you need a timer for this?

    The variable will reference the last view added with this name. You can either set the image at that point or add the view to a list and later set the image to all views from the list.

    Make sure not to load the same image multiple times.
     
  3. daniedb

    daniedb Active Member Licensed User

    Hi Erel.

    In the Timer I process various variables and calculations, and depending on the status if some variables I want to display that image on any view open at that time.

    Thanks
     
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