Java Code Examples for android.animation.LayoutTransition#setStartDelay()

The following examples show how to use android.animation.LayoutTransition#setStartDelay() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LoginFragment.java    From mosby with Apache License 2.0 7 votes vote down vote up
@Override public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
  super.onViewCreated(view, savedInstanceState);
  loginButton.setMode(ActionProcessButton.Mode.ENDLESS);

  int startDelay = getResources().getInteger(android.R.integer.config_mediumAnimTime) + 100;
  LayoutTransition transition = new LayoutTransition();
  transition.enableTransitionType(LayoutTransition.CHANGING);
  transition.setStartDelay(LayoutTransition.APPEARING, startDelay);
  transition.setStartDelay(LayoutTransition.CHANGE_APPEARING, startDelay);
  loginForm.setLayoutTransition(transition);
}
 
Example 2
Source File: PersistentSearchView.java    From PersistentSearchView with Apache License 2.0 7 votes vote down vote up
private void setUpLayoutTransition() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        RelativeLayout searchRoot = (RelativeLayout) findViewById(R.id.search_root);
        LayoutTransition layoutTransition = new LayoutTransition();
        layoutTransition.setDuration(DURATION_LAYOUT_TRANSITION);
        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
            // layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
            layoutTransition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
            layoutTransition.setStartDelay(LayoutTransition.CHANGING, 0);
        }
        layoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
        mSearchCardView.setLayoutTransition(layoutTransition);
    }
}
 
Example 3
Source File: IndicatorDots.java    From lock-screen with MIT License 6 votes vote down vote up
private void initView(Context context) {
    if (mIndicatorType == 0) {
        for (int i = 0; i < mPinLength; i++) {
            View dot = new View(context);
            emptyDot(dot);

            LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(mDotDiameter,
                    mDotDiameter);
            params.setMargins(mDotSpacing, 0, mDotSpacing, 0);
            dot.setLayoutParams(params);

            addView(dot);
        }
    } else if (mIndicatorType == 2) {
        LayoutTransition layoutTransition = new LayoutTransition();
        layoutTransition.setDuration(DEFAULT_ANIMATION_DURATION);
        layoutTransition.setStartDelay(layoutTransition.APPEARING, 0);
        setLayoutTransition(layoutTransition);
    }
}
 
Example 4
Source File: NiboPlacesAutoCompleteSearchView.java    From Nibo with MIT License 5 votes vote down vote up
private void setUpLayoutTransition() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
        RelativeLayout searchRoot = (RelativeLayout) findViewById(R.id.search_root);
        LayoutTransition layoutTransition = new LayoutTransition();
        layoutTransition.setDuration(DURATION_LAYOUT_TRANSITION);
        if (Build.VERSION.SDK_INT > Build.VERSION_CODES.JELLY_BEAN) {
            // layoutTransition.enableTransitionType(LayoutTransition.CHANGING);
            layoutTransition.enableTransitionType(LayoutTransition.CHANGE_DISAPPEARING);
            layoutTransition.setStartDelay(LayoutTransition.CHANGING, 0);
        }
        layoutTransition.setStartDelay(LayoutTransition.CHANGE_DISAPPEARING, 0);
        mSearchCardView.setLayoutTransition(layoutTransition);
    }
}