Closed gcantoni closed 5 years ago
Attribute android:windowShowWallpaper
should make the main screen transparent and the wallpaper visible but for some reason it doesn't ( only in PowerAmp ).
It's already transparent as drawing extra background slightly reduced drawing performance (see around line 88 in default-styles.xml). Poweramp uses Open GL surface over whole area to show blurred album art, visualizations, and backgrounds (activity_list_fast.xml line 56 <com.maxmpz.widget.player.MilkWidget...)
So basically this means that a transparent or semi-transparent skin is not possible, am i right? And disabling the milkmode via styles won't do the trick i guess.
It's possible
<option
key="trans_bg_main"
name="@string/skin_trans_bg_main"
summary="@string/skin_summary_trans_bg_main"
overlapStyle="@style/SampleSkin_transBgMain"
checkedByDefault="false"
/>
add appropriate style to override TopMilk and hide it completely:
<style name="SampleSkin_transBgMain">
<item name="com.maxmpz.audioplayer:TopMilk">@style/SampleSkin_transBgMain_TopMilk</item>
<item name="android:windowShowWallpaper">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
</style>
<style name="SampleSkin_transBgMain_TopMilk" parent="@com.maxmpz.audioplayer:style/TopMilk">
<item name="android:visibility">gone</item>
</style>
Note that this replaces main UI, lists, and equalizer background to wallpaper, thus, some elements/text may be not readable/visible depending on actual wallpaper image.
See ece4839015d33e4786a8283f70a3163551d3af00 for reference.
hi @maxmpz , your solution is partially working. poweramp gets most of its UI broken.
@maxmpz here there is how the UI works with this option enabled/disabled. It seems to break everything. https://imgur.com/a/OelohA1
<item name="android:windowIsFloating">false</item>
did the trick to fix
It's generally not needed as none of Poweramp default styles have windowIsFloating=true, so no reason to set that to false. I can't reproduce any issues on my devices, but if you can, please be more specific (device/ROM/Android version). Thanks!
Device: Pixel 3xl ROM: stock aosp Android Version: Android 9
Without that attribute all the UI as I have said completely broken.
I see, thanks for the details, but this is not reproducible for the sample skin with just transparent background tick checked. Again, there is no windowIsFloating anywhere, but if your skin is modified and includes something with windowIsFloating (basically that makes window to be a dialog), it can produce behavior you describing.
Yup. It's the main dashboard ( not part of skin template, developed from scratch ) that has windowIsFloating.
Btw thanks a lot for your helping!
Hey Maxim!
I'm facing an issue when making a full transparent skin.
Basically everything is transparent as it should be, except the main screen. Why?
I have used all available attributes for transparency offered by Android, and by using this in a normal application coded, the transparency works.
Could you please help? thank you
`