I am trying to use a transition by switching to the generated mesh mode. However, the only thing that flies off radially is the floating button at the bottom of the screen. GridView cells move as a unit. How to make these cells "explode"?
Here is my style.xml :
<resources> <style name="AppTheme" parent="Theme.AppCompat.NoActionBar"> <item name="colorPrimary">@color/colorPrimary</item> <item name="colorPrimaryDark">@color/colorPrimaryDark</item> <item name="colorAccent">@color/colorAccent</item> <item name="colorControlActivated">@color/colorAccent</item> <item name="colorControlHighlight">@color/colorAccent</item> <item name="windowActionBar">false</item> <item name="windowNoTitle">true</item> <item name="android:windowActivityTransitions">true</item> <item name="android:windowContentTransitions">true</item> <item name="android:windowEnterTransition">@android:transition/fade</item> <item name="android:windowExitTransition">@android:transition/explode</item> </style> </resources>
Here is the onCreate GridView activity I'm trying to detonate:
protected void onCreate(Bundle savedInstanceState) { getWindow().requestFeature(Window.FEATURE_ACTIVITY_TRANSITIONS); super.onCreate(savedInstanceState); getWindow().setExitTransition(new Explode()); setContentView(R.layout.activity_main);
Alternatively, if you know examples containing GridView explode transitions, feel free to post them.
source share