[android-developers] Re: How to set theme using resources from another application?

2016-11-15 Thread Ejay F
I managed to set the textColor from a theme from another package by using an override of OnApplyThemeResource of the Activity: protected override void OnApplyThemeResource(Resources.Theme theme, int resId, bool first) { if (first) { var

Re: [android-developers] Re: How to set theme using resources from another application?

2012-08-02 Thread Mor G.
Ok, if I forget about using different drawables, and keep my external theme to modifying current's theme existing attributes only, will that be possible? I've seen the method Resources.Theme.setTo(other) which has the following desc.: Set this theme to hold the same contents as the theme

Re: [android-developers] Re: How to set theme using resources from another application?

2012-08-02 Thread Mor G.
Ok, if I forget about using different drawables, and keep my external theme to modifying current's theme existing attributes only, will that be possible? I've seen the method Resources.Theme.setTo(other) which has the following desc.: Set this theme to hold the same contents as the theme

[android-developers] Re: How to set theme using resources from another application?

2012-08-01 Thread Mor G.
I'm searching for an answer to this as well, found a few related stackoverflow questions, but no full answer yet: http://stackoverflow.com/questions/8762955/android-app-way-to-develop-app-that-has-add-ons http://stackoverflow.com/questions/6066477/hashmapstring-drawable-mdrawables

[android-developers] Re: How to set theme using resources from another application?

2012-08-01 Thread RichardC
If it's your own application then read about library projects. Otherwise unless the app you are reading resources from is available under a suitable open source licence then in my opinion what you are trying to do could be infringing copyright. If the app is open source then just download it and

[android-developers] Re: How to set theme using resources from another application?

2012-08-01 Thread Mor G.
Hi Richard, thanks for the reply. I have an app with light and dark themes defined in themes.xml. I have a setting to allow the user the select light/dark theme in the app. This works great. Now the themes are pretty heavy in graphics, since they define not only styling but different drawables

Re: [android-developers] Re: How to set theme using resources from another application?

2012-08-01 Thread Dianne Hackborn
You can't really do this by simply pointing to a theme. The resources object is used across the view hierarchy to load resources; to set the theme from another apk you will need to have the resources coming from there, but then you won't be able to access any of your own resources that you need

Re: [android-developers] Re: How to set theme using resources from another application?

2012-08-01 Thread Mor G.
Hi Dianne, thanks for the info. I've seen methods like Resources.Theme.applyStyle which capable of overriding existing attributes with a supplied style resource-id, which would have been useful if I could tell it from what resource to get the resource-id from. Isn't there a similar method that

Re: [android-developers] Re: How to set theme using resources from another application?

2012-08-01 Thread Dianne Hackborn
That doesn't solve the problem, which is that you are trying to create a mix of resources from two .apks and you can't currently do that. I would assume these other apps are just directly loading the bitmaps from the other .apk where they need them. On Wed, Aug 1, 2012 at 3:11 PM, Mor G.