當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。