Note that there are some explanatory texts on larger screens.

plurals
  1. POKeeping the same background across multiple activities in Android and excluding them from activity transitions
    primarykey
    data
    text
    <p>I'm working on an Android application at the moment. Basically, I have multiple ViewFlippers which will be used to create sets of 'panels'. For example, I have a ViewFlipper to simulate a home screen environment (multiple panels that can be accessed by swiping left or right), as well as a different ViewFlipper to simulate an application launcher (panels for favorite apps, all apps, settings etc). I've done this by creating each set of panels, or each ViewFlipper in it's own activity, to preserve memory when a set of panels aren't being used.</p> <p>Basically, I want to keep the same background image across all the activities. Now, I know this can be done by creating a style, and applying it in the tags in the manifest, but my issue is that the background image is included in the activity transition animation (my own custom animation has been set, but regardless, using stock transition animations or not, the background image is included).</p> <p>So, what I am asking is, is there a way to keep a common background image across multiple activities that is NOT animated when switching between activities?</p> <p>At the moment, my style xml file looks like this:</p> <pre><code>&lt;style name="Theme" parent="android:Theme"&gt; &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt; &lt;item name="android:windowBackground"&gt;@drawable/background_port&lt;/item&gt; &lt;/style&gt; </code></pre> <p></p> <p>So as you can see, the same drawable is being set as the background for all activities, but it is included in the transition animations between activities, which I don't want. I also have tried android:detachWallpaper="true", but that seems useless in this case.</p> <p>I'm fairly experienced in Android code, so no need to explain things in simple manners. If I don't understand something, I'll ask.</p> <p>Thanks for all your help, it's really appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload