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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:55:11+00:00 2026-05-24T09:55:11+00:00

For example I reference android styles with… @android:style/… and my own apps styles with…

  • 0

For example I reference android styles with…

@android:style/... 

and my own apps styles with…

@style/...

but how can I separate my styles into other names packages? e.g.

@somePackage:style/...
  • 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-24T09:55:12+00:00Added an answer on May 24, 2026 at 9:55 am

    Unfortunately you can’t. You might think that Android Libraries might help you, but this is not the case. That’s because Android Libraries are “physically” merged into main application when resources are compiled.

    So from aapt point of view, your application’s resources are indistinguishable from any other Android Library resources. Even more, aapt receives multiple resources directories as input (i.e. path to res for application, plus paths to all res directories from references Android Libraries), but at the same time only single AndroidManifest.xml from application is passed as the “owner” of these resources.

    What I want to say, is that even though you can logically group resources (such as styles) into separate Android Libraries, you still can’t reference them using these Android Libraries’ package names. Only using main application’s package name.


    For example, you have application with package name com.test.app and Android Library with com.test.lib. And the library contains style testStyle.

    The following doesn’t work (and there is theoretically nothing that can help you to workaround this):

    <TextView style="@com.test.lib:style/testStyle" .../>
    

    While this works fine:

    <TextView style="@com.test.app:style/testStyle" .../>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In PHP, how can a class reference its own name? For example, what would
I can't think of an example where the reference count of a file may
Can you pass by reference with R ? for example, in the following code:
How i can use broad cast receiver in android, Please give me example or
Looking at the example code in the docs http://developer.android.com/reference/android/content/Context.html#getExternalFilesDir%28java.lang.String%29 File path = getExternalFilesDir(Environment.DIRECTORY_PICTURES); It
Can someone please point me to a reference which gives a full circle example
This is about memory-based IPC (like to LocalService example) but for two apps running
I'm using ant to compile my android projects into debug apks. But sometimes when
is there any convert reference between java (for android) and C# ? for example:
In several android styling tutorials parent style elements are used that i can not

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.