0

I'd like to know which class/method parses the styles.xml file in Android apps' resource folder.

I need to set the attribute windowIsTranslucent to true for several applications which source code I don't have.

I thought I could hook into the method that parses the styles.xml file and "force" the value of the attribute, using the Xposed framework.

maddouri
  • 3,737
  • 5
  • 29
  • 51
  • I barely know the Framework but overriding Activity#onCreate *could* be a suitable entrypoint to set that property. – Machinarius Aug 05 '14 at 15:23
  • Thanks for the reply. Could you please suggest how I could achieve that ? I have already used Xposed to hook on `Activity#onCreate` then used `getWindow().getContext().setTheme(android.R.style.Theme_Translucent);` but the transparency was applied only to the activity, not the "external zone" on the screen, which made me think that `setTheme()` does actually not have the same effect as `styles.xml` – maddouri Aug 06 '14 at 07:08
  • Is the external zone the status bar? That can only be made translucent on kitkat. Unless you hook into the event loop itself and somehow change it's color from there. Try reading this question http://stackoverflow.com/questions/4663752/switching-application-wide-theme-programmatically – Machinarius Aug 06 '14 at 09:38
  • No. I just want to make some apps have a [floating window](http://cases.azoft.com/android-tutorial-floating-activity/). It is simple to hook on `Activity#onAttachedToWindow()` (using Xposed) to resize/move the activities, but I couldn't find how to alter the value of `windowIsTranslucent` to make the "external zone" transparent and allow for touch events to go through. – maddouri Aug 06 '14 at 14:34
  • Oh, you mean something like Paranoid's HALO? I believe it has been implemented already as an Xposed Module. In any case, i believe XDA Developers' forums would be a better place to ask this question – Machinarius Aug 06 '14 at 15:57

0 Answers0