Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,813,956 Members 42,565 Now Online
XDA Developers Android and Mobile Development Forum

[Q][Xposed] Altering an Application's Style/Theme

Tip us?
 
M4X MX
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Jul 2014
Default [Q][Xposed] Altering an Application's Style/Theme

Hello,

I want to force some applications to have floating windows using the (awesome ^^ ) Xposed framework.

So far, I managed to hook on the "onAttachedToWindow()" method (as explained here goo.gl/ZFb8iQ ) to set the floating layout (as explained in goo.gl/GyCXac ), which seems to work pretty well (I can't embed a screenshot due to the forum's restrictions to new members).

However, in order to set a transparent background (outside the resized app, in order to allow the manipulation of other apps in the background), the only method that I'm aware of is adding the following line in the app theme (e.g. styles.xml)

Code:
<item name="android:windowIsTranslucent">true</item>
My question is: how can I do that using Xposed ?

Thanks in advance for your help.
 
GermainZ
Old
#2  
GermainZ's Avatar
Forum Moderator / Recognized Developer
Thanks Meter 6,425
Posts: 5,490
Join Date: Aug 2012
windowIsTranslucent can't be set programmatically AFAIK. You could try seeing where windowIsTranslucent is parsed and set (in the AOSP source code), and hook that method to enable it for your package.
 
M4X MX
Old
(Last edited by M4X MX; 29th July 2014 at 11:53 AM.)
#3  
Junior Member - OP
Thanks Meter 0
Posts: 3
Join Date: Jul 2014
Quote:
Originally Posted by GermainZ View Post
windowIsTranslucent can't be set programmatically AFAIK. You could try seeing where windowIsTranslucent is parsed and set (in the AOSP source code), and hook that method to enable it for your package.
I see. It's a shame the Android framework doesn't allow such a thing...

Is there any other technique for forcing activities to display a floating window (programmatically) ?

Also, would it be possible, with the help of Xposed, to create a translucent floating window then "insert" a hooked activity into it ?
Or, how could I use Xposed to make an app use a custom theme ?
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes