本文整理汇总了Java中android.transition.Slide.setStartDelay方法的典型用法代码示例。如果您正苦于以下问题:Java Slide.setStartDelay方法的具体用法?Java Slide.setStartDelay怎么用?Java Slide.setStartDelay使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.transition.Slide
的用法示例。
在下文中一共展示了Slide.setStartDelay方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setupSlideTransition
import android.transition.Slide; //导入方法依赖的package包/类
private void setupSlideTransition() {
Slide slideEnter = new Slide();
slideEnter.setSlideEdge(Gravity.LEFT);
slideEnter.setDuration(500);
slideEnter.setStartDelay(250);
slideEnter.excludeTarget(android.R.id.navigationBarBackground, true);
slideEnter.excludeTarget(android.R.id.statusBarBackground, true);
getWindow().setEnterTransition(slideEnter);
Slide slideOut = new Slide();
slideOut.setSlideEdge(Gravity.RIGHT);
slideOut.setDuration(500);
slideOut.setStartDelay(0);
slideOut.excludeTarget(android.R.id.navigationBarBackground, true);
slideOut.excludeTarget(android.R.id.statusBarBackground, true);
getWindow().setExitTransition(slideOut);
}
示例2: setupSlideTransition
import android.transition.Slide; //导入方法依赖的package包/类
private void setupSlideTransition() {
Slide slideEnter = new Slide();
slideEnter.addTarget(R.id.text_card);
slideEnter.setDuration(1000);
slideEnter.setStartDelay(500);
slideEnter.setSlideEdge(Gravity.RIGHT);
slideEnter.excludeTarget(android.R.id.navigationBarBackground, true);
slideEnter.excludeTarget(android.R.id.statusBarBackground, true);
getWindow().setEnterTransition(slideEnter);
// Tips: Cann't set same Transition object to more than one Transition callbacks.
// getWindow().setReenterTransition(slideEnter);
Slide slideOut = new Slide();
slideOut.addTarget(R.id.text_card);
slideOut.setDuration(500);
slideOut.setSlideEdge(Gravity.RIGHT);
slideOut.excludeTarget(android.R.id.navigationBarBackground, true);
slideOut.excludeTarget(android.R.id.statusBarBackground, true);
getWindow().setExitTransition(slideOut);
}
示例3: setupTransitions
import android.transition.Slide; //导入方法依赖的package包/类
/**
* Setup fragment transitions
*/
public void setupTransitions() {
SidePropagation propagateBottom = new SidePropagation();
propagateBottom.setSide(Gravity.BOTTOM);
propagateBottom.setPropagationSpeed(2);
SidePropagation propagateTop = new SidePropagation();
propagateTop.setSide(Gravity.TOP);
propagateTop.setPropagationSpeed(2);
// Transition used for replacement fragments
mNewEnterTransition = new Slide(Gravity.END);
mNewEnterTransition.setPropagation(propagateBottom);
mNewEnterTransition.setStartDelay(100);
mNewExitTransition = new Slide(Gravity.END);
mNewExitTransition.setPropagation(propagateBottom);
mNewExitTransition.setStartDelay(0);
// Transition used for main menu entering and exiting
mMainExitTransition = new Slide(Gravity.START);
mMainExitTransition.setPropagation(propagateTop);
mMainExitTransition.setStartDelay(0);
// Transition used for main menu reentering
mMainReenterTransition = new Slide(Gravity.START);
mMainReenterTransition.setPropagation(propagateTop);
mMainReenterTransition.setStartDelay(200);
}
示例4: initTransitions
import android.transition.Slide; //导入方法依赖的package包/类
private void initTransitions() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Slide slideInBottom = new Slide();
slideInBottom.addTarget(R.id.text_image_fragment_camera_info);
slideInBottom.addTarget(R.id.text_image_fragment_lens_info);
slideInBottom.setStartDelay(300);
getActivity().getWindow().setEnterTransition(slideInBottom);
Slide slide = new Slide();
slide.addTarget(R.id.text_image_fragment_camera_info);
slide.addTarget(R.id.text_image_fragment_lens_info);
}
}
示例5: initTransitions
import android.transition.Slide; //导入方法依赖的package包/类
private void initTransitions() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
Slide slideInBottom = new Slide();
slideInBottom.addTarget(R.id.text_image_camera_info);
slideInBottom.addTarget(R.id.text_image_lens_info);
slideInBottom.setStartDelay(300);
getWindow().setEnterTransition(slideInBottom);
Slide slide = new Slide();
slide.addTarget(R.id.text_image_camera_info);
slide.addTarget(R.id.text_image_lens_info);
getWindow().setReturnTransition(slide);
postponeEnterTransition();
}
}
示例6: setUpTransitions
import android.transition.Slide; //导入方法依赖的package包/类
private void setUpTransitions() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getWindow().setSharedElementsUseOverlay(true);
final float[] buttonLocation = getIntent().getFloatArrayExtra(EXTRA_REVEAL_ANIM_LOCATION);
final float x = buttonLocation[0];
final float y = buttonLocation[1];
CircularRevealTransition circularRevealTransition = new CircularRevealTransition(x, y);
circularRevealTransition.addTarget(getString(R.string.transition_name_circular_reveal));
circularRevealTransition.setInterpolator(new FastOutSlowInInterpolator());
Slide enterSlide = new Slide();
enterSlide.setDuration(300);
enterSlide.setStartDelay(400);
enterSlide.setInterpolator(new FastOutSlowInInterpolator());
enterSlide.excludeTarget(getString(R.string.transition_name_circular_reveal), true);
enterSlide.excludeTarget(Window.STATUS_BAR_BACKGROUND_TRANSITION_NAME, true);
Slide returnSide = new Slide();
returnSide.setDuration(300);
returnSide.setInterpolator(new FastOutSlowInInterpolator());
returnSide.excludeTarget(getString(R.string.transition_name_circular_reveal), true);
returnSide.excludeTarget(Window.STATUS_BAR_BACKGROUND_TRANSITION_NAME, true);
TransitionSet set =
new TransitionSet().addTransition(circularRevealTransition).addTransition(enterSlide);
TransitionSet set2 =
new TransitionSet().addTransition(returnSide).addTransition(circularRevealTransition);
getWindow().setEnterTransition(set);
getWindow().setReturnTransition(set2);
ChangeBounds enterBounds = new ChangeBounds();
enterBounds.setDuration(300);
enterBounds.setStartDelay(400);
enterBounds.setInterpolator(new FastOutSlowInInterpolator());
ChangeBounds returnBounds = new ChangeBounds();
returnBounds.setDuration(300);
returnBounds.setInterpolator(new FastOutSlowInInterpolator());
getWindow().setSharedElementEnterTransition(enterBounds);
getWindow().setSharedElementReturnTransition(returnBounds);
}
}
示例7: setTransition
import android.transition.Slide; //导入方法依赖的package包/类
private void setTransition() {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
return;
}
final TransitionSet transition = new TransitionSet();
ChangeBounds transition1 = new ChangeBounds();
transition.addTransition(transition1);
ChangeTransform transition2 = new ChangeTransform();
transition.addTransition(transition2);
ChangeClipBounds transition3 = new ChangeClipBounds();
transition.addTransition(transition3);
ChangeImageTransform transition4 = new ChangeImageTransform();
transition.addTransition(transition4);
transition.setDuration(SHARED_ELEMENT_TRANSITION_DURATION);
FastOutSlowInInterpolator interpolator = new FastOutSlowInInterpolator();
transition1.setInterpolator(interpolator);
transition2.setInterpolator(interpolator);
transition3.setInterpolator(interpolator);
transition4.setInterpolator(interpolator);
final GravityArcMotion pathMotion = new GravityArcMotion();
transition.setPathMotion(pathMotion);
getWindow().setSharedElementEnterTransition(transition);
getWindow().setSharedElementReturnTransition(transition);
getWindow().setSharedElementsUseOverlay(false);
Slide slide = new Slide(Gravity.TOP);
slide.setInterpolator(new LinearOutSlowInInterpolator());
slide.addTarget(appBar);
slide.setDuration(225);
slide.setStartDelay(100);
getWindow().setEnterTransition(slide);
Slide slideOut = (Slide) slide.clone();
slideOut.setInterpolator(new FastOutLinearInInterpolator());
slideOut.setStartDelay(0);
getWindow().setReturnTransition(slideOut);
}