Example usage for android.transition TransitionManager beginDelayedTransition

List of usage examples for android.transition TransitionManager beginDelayedTransition

Introduction

In this page you can find the example usage for android.transition TransitionManager beginDelayedTransition.

Prototype

public static void beginDelayedTransition(final ViewGroup sceneRoot, Transition transition) 

Source Link

Document

Convenience method to animate to a new scene defined by all changes within the given scene root between calling this method and the next rendering frame.

Usage

From source file:com.hannesdorfmann.search.SearchActivity.java

@Override
  public void showError(@NotNull Throwable t) {

      castedViewState().setShowError(t);

      if (!isRestoringViewState()) {
          TransitionManager.beginDelayedTransition(container, auto);
      }/*  www  .ja v a2s.co m*/

      progress.setVisibility(View.GONE);
      results.setVisibility(View.GONE);
      fab.setVisibility(View.GONE);
      errorView.setVisibility(View.VISIBLE);
      AnimatedVectorDrawable avd = (AnimatedVectorDrawable) errorView.getDrawable();
      avd.start();
  }

From source file:com.roselism.bottomsheet.BottomSheet.java

private void showFullItems() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
        Transition changeBounds = new ChangeBounds();
        changeBounds.setDuration(300);/*from ww w . j  a v  a  2  s  .c  o  m*/
        TransitionManager.beginDelayedTransition(list, changeBounds);
    }
    actions = fullMenuItem;
    updateSection();
    adapter.notifyDataSetChanged();
    list.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT,
            LinearLayout.LayoutParams.MATCH_PARENT));
    icon.setVisibility(View.VISIBLE);
    icon.setImageDrawable(close);
    icon.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            showShortItems();
        }
    });
    setListLayout();
}

From source file:com.achep.acdisplay.ui.fragments.AcDisplayFragment.java

@SuppressLint("NewApi")
private void maybeBeginDelayedTransition(@Nullable ViewGroup sceneRoot, @Nullable Transition transition) {
    if (Device.hasKitKatApi() && isAnimatableAuto() && sceneRoot != null && sceneRoot.isLaidOut()) {
        TransitionManager.beginDelayedTransition(sceneRoot, transition);
    }/* w ww.  j a va 2  s . com*/
}