Code example for AnimatorSet

Methods: cancel

0
        }); 
    } 
 
    private void cancelAnimations() { 
        mDropTargetBarFadeInAnim.cancel();
        mDropTargetBarFadeOutAnim.cancel();
        mQSBSearchBarFadeInAnim.cancel();
        mQSBSearchBarFadeOutAnim.cancel();
    } 
 
    /* 
     * Shows and hides the search bar. 
     */ 
    public void showSearchBar(boolean animated) {
        cancelAnimations(); 
        if (animated) {
            mQSBSearchBarFadeInAnim.start();
        } else { 
            mQSBSearchBar.setVisibility(View.VISIBLE);
            mQSBSearchBar.setAlpha(1f);
Experience pair programming with AI  Get Codota for Java