title: Custom animation on fragments, but selective
body: <p>I have base class for all Fragments and overrided method <code>onCreateAnimation</code> to use custom animations at all once, but need to exclude some fragment(s). I did it using <code>instanceof</code> but i use nested fragments and it does work as expected. Is an elegant way to disable animation for some fragments in this situation ?</p>
  
  <pre><code>abstract public class BaseFragment&lt;T&gt; extends Fragment {
      public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
         if(this instanceof ScannerFragment) {
            return super.onCreateAnimation(transit, enter, nextAnim);
         } else {
            // custom animation
         }
      }
  }
  </code></pre>