0

I'm trying to figure out how to change the following image on start app with LibGdx framework.

enter image description here

I would like to customize it with my logo , but I can not find the reference in the solution . Thanks for your help.

Mr. Developer
  • 3,295
  • 7
  • 43
  • 110

3 Answers3

1

In windows explorer go to <path to your project>/desktop/assets

You'll see the default LibGDX image and here you can put all of your assets files (images, fonts, etc). You may also need to refresh your project folders in Android Studio so that the new image(s) will show up.

The java file that loads the image is under the core/src folder. Open this file and you will see where it loads the default image. Change the name of the image to the name of your new image and that should do it.

NOTE: If you are planning to build for android also, android will only see assets that are located in the android/assets folder (it's annoying, but this is the only way it works). I don't use Android Studio, but look up how to set the working directory for your desktop project to use the android/assets folder (instead of desktop/assets). Then put all of your images into the android/assets folder. This one took me a while to find out when I first started building for android. So if your desktop build works, but android doesn't...this is what you need to do to fix it. :)

Tekkerue
  • 1,497
  • 1
  • 11
  • 17
1

For IOS platform you should add in your ios/assets folder your own splash images in all resolutions with defined naming structure of Apple.

  • "Default.png" - 320x480 iphone3gs
  • "Default@2x.png" - 640x960 iphone4
  • "Default~ipad.png" - 768x1024 ipad
  • "Default@2x~ipad - 1536x2048 ipad retina ...etc

    more details you can find here ..

Libgdx project for iOS displaying libgdx splash when compiling through robovm on simulator?

Community
  • 1
  • 1
1

1)for android, go to asset folder and paste your image

2)Refresh the asset folder

3) in your create method

//libgdx.png is the default image name that provided by the libgdx

texture = new Texture(Gdx.files.internal("data/libgdx.png"));

//in above code remove that "libgdx.png " and add your image name

Example:-

   texture = new Texture(Gdx.files.internal("your image name.png"));