Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8118997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:40:10+00:00 2026-06-06T04:40:10+00:00

In LibGdx, texture image is stored in asset folder and loaded using following code.

  • 0

In LibGdx, texture image is stored in asset folder and loaded using following code.

Texture texture = new Texture(Gdx.files.internal("image/someImage.jpg"));

I have different texture for different screen resolution, so I want to use Android “res/” directory for saving texture image, which helps to load appropriate image file for appropriate resolution.

Is there any way to load image file from Android “res/” directory?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:40:11+00:00Added an answer on June 6, 2026 at 4:40 am

    You should look into libgdx’s ResolutionFileResolver, and also use AssetManager (it will ease everything for you).

    You supply it resolutions and the proper folder to use, and then libgdx automagically selects the folder with the best match.

    Resolution[] resolutions = { new Resolution(320, 480, ".320480"),
                              new Resolution(480, 800, ".480800"),
                              new Resolution(480, 856, ".480854") };
    ResolutionFileResolver resolver = new ResolutionFileResolver(new InternalFileHandleResolver(), resolutions);
    manager = new AssetManager();
    

    This is the way to do it in libgdx, you shouldn’t touch the res folder.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using libgdx and have following code float[] x; ... Buffer vVertices=x;//what to
How to use different texture(image) for different resolution in libGDX? Also specify how to
I'm using a Win 7 64-bit system. LibGDX gdx-helloworld-android app works fine. It doesn't
I'm writing a game for Android using libgdx. Here is some code that draws
I am using libgdx on a little game and I have a little animation
I'm developing a game using the libGDX Framework. I'd like to implement an icon
I'm building a little Android game using libgdx. For now I have a copy
I am very new to developing applications with LibGDX and 3D apps in general
When i am closing my JFileChooser dialog, it opens again. I'm using the libgdx
I was using Java 1.7 for my Libgdx application, however i found i was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.