当前位置: 首页>>代码示例>>Java>>正文


Java Transition.excludeTarget方法代码示例

本文整理汇总了Java中android.transition.Transition.excludeTarget方法的典型用法代码示例。如果您正苦于以下问题:Java Transition.excludeTarget方法的具体用法?Java Transition.excludeTarget怎么用?Java Transition.excludeTarget使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.transition.Transition的用法示例。


在下文中一共展示了Transition.excludeTarget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: constructTransitions

import android.transition.Transition; //导入方法依赖的package包/类
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
private TransitionSet constructTransitions() {
	int[] slideTargets = {R.id.ChatRecyclerView, R.id.chat_input, R.id.chat_input_divider};

	Transition slideTransition = new Slide(Gravity.BOTTOM);
	Transition fadeTransition = new Fade();

	for (int slideTarget : slideTargets) {
		slideTransition.addTarget(slideTarget);
		fadeTransition.excludeTarget(slideTarget, true);
	}

	TransitionSet set = new TransitionSet();
	set.addTransition(slideTransition);
	set.addTransition(fadeTransition);
	return set;
}
 
开发者ID:SebastianRask,项目名称:Pocket-Plays-for-Twitch,代码行数:18,代码来源:LiveStreamActivity.java

示例2: setupTransitions

import android.transition.Transition; //导入方法依赖的package包/类
public void setupTransitions() {
    // Add shared element transition animation if on Lollipop or later
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        // Enter transitions
        TransitionSet setEnter = new TransitionSet();

        Transition slideDown = new Explode();
        slideDown.addTarget(headerView);
        slideDown.excludeTarget(scrollView, true);
        slideDown.setDuration(500);
        setEnter.addTransition(slideDown);

        Transition fadeOut = new Slide(Gravity.BOTTOM);
        fadeOut.addTarget(scrollView);
        fadeOut.setDuration(500);
        setEnter.addTransition(fadeOut);

        // Exit transitions
        TransitionSet setExit = new TransitionSet();

        Transition slideDown2 = new Explode();
        slideDown2.addTarget(headerView);
        slideDown2.setDuration(570);
        setExit.addTransition(slideDown2);

        Transition fadeOut2 = new Slide(Gravity.BOTTOM);
        fadeOut2.addTarget(scrollView);
        fadeOut2.setDuration(280);
        setExit.addTransition(fadeOut2);

        getWindow().setEnterTransition(setEnter);
        getWindow().setReturnTransition(setExit);
    }
}
 
开发者ID:adithya321,项目名称:SOS-The-Healthcare-Companion,代码行数:35,代码来源:ViewActivity.java

示例3: setSceneTransitionAnimation

import android.transition.Transition; //导入方法依赖的package包/类
public void setSceneTransitionAnimation() {
	if (Build.VERSION.SDK_INT < 21) return;
	Transition slide = new Slide(Gravity.RIGHT);
	slide.excludeTarget(android.R.id.statusBarBackground, true);
	slide.excludeTarget(android.R.id.navigationBarBackground, true);
	Window window = getWindow();
	window.requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
	window.setExitTransition(slide);
	window.setEnterTransition(slide);
	window.setTransitionBackgroundFadeDuration(getResources()
			.getInteger(android.R.integer.config_longAnimTime));
	window.setBackgroundDrawableResource(android.R.color.transparent);
}
 
开发者ID:rafjordao,项目名称:Nird2,代码行数:14,代码来源:BriarActivity.java


注:本文中的android.transition.Transition.excludeTarget方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。