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 5949929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:19:16+00:00 2026-05-22T17:19:16+00:00

This is also a design question. I don’t know the best way to design

  • 0

This is also a design question. I don’t know the best way to design having many activities and how to break them up into packages while still accessing the apps resources.

I have an application which allows a user to login and access a tabbed activity which gives access to many modules. If they click a module they will load the module which will in turn contains a tabbed activity.

Currently i have 3 packages within this app:

  • com.appname.app (many activities i’d like to split up, login, module list etc)
  • com.appname.app.XML (xml handlers)
  • com.appname.app.Utils (static util classes etc)

I’d like to add a new package to contain all my modules so something like

  • com.appname.app.Modules ( or even a seperate package for EACH module)

But i can then no longer access the main apps resources without referring to them with a full package name such as setContentView(com.appname.app.R.layout.channel_list);

Obviously within any com.appname.app activities i just reference the resources such as layouts via setContentView(R.layout.channel_list);.

I’d have thought that a sub package (sub directory) should have access to a parent’s resources without having to use com.appname.app.R.layout.channel_list instead of R.layout.channel_list. Which is why i’m assuming something is wrong with my design

The same issue goes for accessing string, drawable etc resources…

Im sure this is something very basic I’m missing. I’ve tried manually importing the “parent” package and that didn’t work either.

is this how i should be doing things? or should i somehow be creating the resource files within each module package? or there another way i should be handling the design/split up of my app?

  • 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-22T17:19:16+00:00Added an answer on May 22, 2026 at 5:19 pm

    Since the Android pre-compiler would compile all references to a R.class file and place in in the main package there’s no better way than to explicitly import the resources wherever you want to use them

    import com.appname.app.R;
    

    so that no full qualifier is needed.

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

Sidebar

Related Questions

Now, I know this question is very opinion oriented because people generally design their
I realize this is more of a hardware question, but this is also very
So this question is regarding the .Net IAsyncResult design pattern and the necessity of
I'm struggling since a few hours with this design question. In Cocoa for example,
Another way to ask this question is: what is Inversion of Control according to
Let me preface this question by stating that i don't usually condone the practice
A question about c++ design and efficiency... Imagine this code - Database db; class
another database structuring question, hope you guys dont mind :D i am having this
I am working in Python, but this is a general design question so general
This is a pretty basic C++ design question: I have a class that contains

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.