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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:06:14+00:00 2026-05-24T18:06:14+00:00

I am writing an application in Android and want users to be able to

  • 0

I am writing an application in Android and want users to be able to download themes and/or create ones themselves. The app would come with some default images and either themes could be installed from Market/as other APKs or could be put on sdcard – either would be fine.

What I want is:
– allow themes to override images in buttons – right now I have XML styles to do things like highlighting when selected ( for button background + for combining button bg with actual button images)
– allow themes to override background and text colors for certain things (I’m not using styles there for now, but I could if that would make things easier)

I am wondering if it’s simply possible to override style definitions in my Application/Activity’s onCreate based on configuration – I wouldn’t mind user having to restart the app after style change.

Also, if it would be another APK, how would my main APK get it – by enumerating packages and filtering by package name?

Is there perhaps a good tutorial about it?

  • 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-24T18:06:15+00:00Added an answer on May 24, 2026 at 6:06 pm

    This kind of thing isn’t really supported as a standard facility in Android, so you are heading towards a lot of work to construct it yourself.

    The first thing you need to know about is Context.createPackageContext(), which allows you to create a Context for another .apk (and thus load its resources). You can then use that Context to load the images and such. Note that these resources are completely distinct from your own app’s resources, so you can’t use standard facilities like themes or such to do the replacement. You will just need to manually put code everywhere you want to load a “themed” resources that explicitly retrieves it from this Context.

    To discover the available .apks (and thus the package name to use with createPackageContext()), you can use the PackageManager facilities to do a query for components. For example, you can say that each theme .apk will have a like this:

    <receiver android:name="something">
        <intent-filter>
            <action android:name="com.mydoman.action.THEME" />
        </intent-filter>
    </receiver>
    

    Now you can find all of the .apks with such receivers through PackageManager.queryBroadcastReceivers():

    http://developer.android.com/reference/android/content/pm/PackageManager.html#queryBroadcastReceivers(android.content.Intent, int)

    To select those with the above intent filters, use a Intent made with:

    Intent intent = new Intent("com.mydoman.action.THEME");
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing an Android application that I want to be able to send requests
I am writing a android application where I want to register my application to
I'm writing an application in PhoneGap that I want to run on iOS, Android,
I am writing a camera application for Android, I want my application to be
I am writing an application for Android devices, Now I want to implement the
I am writing an Android application that uses some functionality that has been published
Hi I am writing an Android application in which I want to retrieve the
I want to create a custom logger for android application. The logging should be
Writing a dictionary application for android. Want to set translation direction in accord with
I am writing an android password manager application and i want to store the

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.