Android Question set the activity background

Discussion in 'Android Questions' started by yaniv hanya, Jul 21, 2019.

  1. yaniv hanya

    yaniv hanya Active Member Licensed User

    This is probably a simple question, but I could not find an answer.
    I just have to load a picture to the activity background form the DirAssets
    how do I call it?
    Activity.Background= ???
  2. William Lancee

    William Lancee Member Licensed User

    Dim bm As Bitmap
    File.DirAssets, "theimagename.jpg")
    jimmyF likes this.
  3. yaniv hanya

    yaniv hanya Active Member Licensed User

    thank you very much
  4. emexes

    emexes Well-Known Member Licensed User

    or put a big ImageView at the bottom of your View stack (in Designer - go to the Views Tree tab and drag the ImageView to the top of the pile, just under Activity).

    But given there's an Activity method specifically for the task, try that first.

    edit: although... if it's a static image, then perhaps the ImageView-at-back method might be simpler, eg, no code required
  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