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

  • SEARCH
  • Home
  • 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 7012257
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:13:57+00:00 2026-05-27T22:13:57+00:00

My Android project is intended to be distributional as a reusable library, as a

  • 0

My Android project is intended to be distributional as a reusable library, as a jar. My understanding is that I can not use any resources (no references to the static R class). I have a couple of questions about how to do this.

What is a good way to handle drawables? If I include an image on my sourcepath at /images/image.png then I can load it with the below code. Is this a good strategy?

InputStream is = getClass().getResourceAsStream("/images/image.png");
BitmapFactory.decodeStream(is);

How should I handle internationalization? I guess I could include all my strings into a Java class and than return one based on the device’s language. But, would this be a memory burden on my app? Also, what is the proper way to determine the device’s language?

  • 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-05-27T22:13:57+00:00Added an answer on May 27, 2026 at 10:13 pm

    Is there any reason for distributing it as a jar? I would advice you to distribute it as a Library Project instead. Android Library Projects, described here, will let you use the static R class the same way you use it in a normal project, and you will have the ability to handle internationalization as well.

    A very good reason for using a library project is the fact that resources placed in the res/ folder are heavily compressed compile-time to decrease the final size of you binary. This is true both for images and xml files.

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

Sidebar

Related Questions

Eclipse is complaining about my Android project saying all my references to resources are
I have an Android project that depends on an android library (apklib) project. The
In my android project, I use a external jar which will use the class
I have been working on a Android project, that is intended to be compatible
I have an Android project that branched into three different applications, app-1 , app-2
I can't compile my Android project for the Dalvik VM because of this error:
In my searchable.xml in my android project, I get to specify a hint that
I have fishished an android project and set up admob ads but it's not
I have an Android project for which I use the Eclipse IDE and I
here I uploaded my Android project made in Eclipse. The idea is that i

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.