Android Code Snippet Sample Splash Screen

Discussion in 'Code Snippets' started by RandomCoder, Sep 29, 2016.

  1. RandomCoder

    RandomCoder Well-Known Member Licensed User

    As requested by Fhren Meza after seeing a sample video I posted on YouTube, here is a sample splash screen. In the end I abandoned the transparent background with fade to black because the very top title bar area always looks a little ametuerish. Anyhow, please see the attached project if wanting to re-create the look shown here...
     

    Attached Files:

  2. LucaMs

    LucaMs Expert Licensed User

  3. nico78

    nico78 Active Member Licensed User

    Thanks RandomCoder,


    I slightly modified the code for have the imageview transparency and the proper positioning of the image, see the attached file.
     

    Attached Files:

    Beja and JakeBullet70 like this.
  4. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Thanks @nico78 I'm only just starting to use the designer and often over constrain things as shown by @LucaMs
    I only posted this because of a request made on YouTube, it's just meant as a simple starting point. Thanks for improving ;)
     
    Cableguy, Beja and DonManfred like this.
  5. Kirk Grayson

    Kirk Grayson Member Licensed User

    I don't know if its appropriate just to post to say thanks, But THANKS, this really helped me. Appreciated.
     
    inakigarm, Cableguy and RandomCoder like this.
  6. Cableguy

    Cableguy Expert Licensed User

    Very nicely done !
     
    RandomCoder likes this.
  7. rkmoray

    rkmoray Active Member Licensed User

    I like your splash screen, but when it is finished and my main screen loads, the splash logo is still visible.
    How did I hide frmSplash?
     
  8. RandomCoder

    RandomCoder Well-Known Member Licensed User

    Sorry for the slow reply, I only saw your post this morning and was not near a computer.
    The easiest way is just to remove all the views from the Activity. The intention with this splash screen demo was that users would load their own Activities or Layouts once the splash had completed, but if you wish to remove teh splash image from the Activity you can do it like this....
    Code:
    Sub Splash_End
        tmrSplashFade.Enabled = 
    False
        
    Activity.RemoveAllViews
    End Sub
     
  9. rkmoray

    rkmoray Active Member Licensed User

    Thanks
     
    RandomCoder likes this.
  10. achtrade

    achtrade Active Member Licensed User

    This is working fine in my tablet LG G pad F 8.0 but the splash image is to small for the screen. How can I do to make the image proportional to the screen ?
     
  11. RandomCoder

    RandomCoder Well-Known Member Licensed User

    I'm not in front of a PC at the moment (using a tablet), but if I recall correctly the image is loaded in the designer making it easy to select a new image or you could use anchors or a script to size the image as needed for different sized screens.
     
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