I have a transparent activity with a card in the middle, the style for the activity is :
<style name="Theme.Transparent" parent="android:Theme.Material">
<item name="android:windowIsTranslucent">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:statusBarColor">@android:color/transparent</item>
</style>
The problem is that when something changes in the background my activity flickers, is there anything that can be done with this?
Some extra details: The box is an activity with a view in the middle and translucent and transparent background. It is started during the call start. The UI issue isn’t present at all on phones that don’t change the background after the call has ended, so for sure the issue is because my activity is being redrawn or something if the background changes.
3
You need to post code in order for us to help you here. Judging from the GIF, it seems like the dial-app is put shortly into foreground (the blue rectangle is disappearing for a few milliseconds). My wild guess is that you have some app-state that enforces the modal box to pop up. The dial app is put into foreground and then your app-state wants to show the modal box again. But as I said, please go more into detail and share some code to figure out what happens here. Might be a rubber-duck problem 😉
again, please post some related code. Does the Activity contain any code? What theme is your activity using? Do you apply any animations like android:windowAnimationStyle in your theme? I picked your GIF into single images from left to right. Maybe this helps: imgur.com/Y03k2zv
You didn’t provide a minimum reproducible example so that someone can offer a help.. How to create a Minimal, Reproducible Example