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


Java Slide.excludeTarget方法代码示例

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


在下文中一共展示了Slide.excludeTarget方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:suzp1984,项目名称:AndroidFlipCardTransition,代码行数:20,代码来源:BigCardActivity.java

示例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);
}
 
开发者ID:suzp1984,项目名称:AndroidFlipCardTransition,代码行数:22,代码来源:FlipCardTransitionActivity.java

示例3: initData

import android.transition.Slide; //导入方法依赖的package包/类
@Override
public void initData(Bundle savedInstanceState) {
    if (savedInstanceState != null){
        videoInfo = (VideoListInfo.Video) savedInstanceState.getSerializable(Constants.VIDEO_INFO);
    }
    initMedia();
    if (videoInfo.getData().getConsumption() !=null ){
        initRecyclerView();
        mPresenter.getRelaRelateVideoInfo(videoInfo.getData().getId());
        mPresenter.getShareInfo(videoInfo.getData().getId());
    }else {
        mPresenter.getVideoData(videoInfo.getData().getId());
    }
    dragBottomView.setDismissedListener(this);
    replyDragBottomView.setDismissedListener(this);
    if (supportsTransitions()){
        Slide slide = new Slide(Gravity.BOTTOM);
        slide.setDuration(500L);
        slide.excludeTarget(android.R.id.statusBarBackground, true);
        slide.excludeTarget(android.R.id.navigationBarBackground, true);
        slide.excludeTarget(R.id.rl_screen, true);
        slide.excludeTarget(R.id.detail_player, true);
        getWindow().setEnterTransition(slide);
        getWindow().getEnterTransition().excludeTarget(R.id.frameLayout,true);
        getWindow().getEnterTransition().excludeTarget(R.id.fl_loading,true);
        Fade fade = new Fade();
        fade.setDuration(500L);
        getWindow().setReturnTransition(fade);
    }

}
 
开发者ID:Zweihui,项目名称:Aurora,代码行数:32,代码来源:VideoDetailActivity.java

示例4: prepareTransition

import android.transition.Slide; //导入方法依赖的package包/类
private void prepareTransition() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        getWindow().setStatusBarColor(Color.TRANSPARENT);
        getWindow().setEnterTransition(transition);
        getWindow().setReturnTransition(transition);
    }
}
 
开发者ID:ArturVasilov,项目名称:AndroidArchitecture,代码行数:10,代码来源:MovieDetailsActivity.java

示例5: prepareWindowForAnimation

import android.transition.Slide; //导入方法依赖的package包/类
@Override
public void prepareWindowForAnimation() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        getWindow().setStatusBarColor(Color.TRANSPARENT);
        getWindow().setEnterTransition(transition);
        getWindow().setReturnTransition(transition);
    }
}
 
开发者ID:ArturVasilov,项目名称:AndroidArchitecture,代码行数:11,代码来源:MovieDetailsActivity.java

示例6: initActivityTransitions

import android.transition.Slide; //导入方法依赖的package包/类
private void initActivityTransitions() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        getWindow().setEnterTransition(transition);
        getWindow().setReturnTransition(transition);
    }
}
 
开发者ID:AliAbozaid,项目名称:Grability,代码行数:9,代码来源:ProductDetailsActivity.java

示例7: prepareWindowForAnimation

import android.transition.Slide; //导入方法依赖的package包/类
private void prepareWindowForAnimation() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        getWindow().setStatusBarColor(Color.TRANSPARENT);
        getWindow().setEnterTransition(transition);
        getWindow().setReturnTransition(transition);
    }
}
 
开发者ID:ArturVasilov,项目名称:AndroidSchool,代码行数:10,代码来源:MovieDetailsActivity.java

示例8: startAllTransitions

import android.transition.Slide; //导入方法依赖的package包/类
/**
 * Method startAllTransitions
 * if API 21 then effects are settled
 */
private void startAllTransitions() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        getWindow().setEnterTransition(transition);
        getWindow().setReturnTransition(transition);
    }
}
 
开发者ID:raulh82vlc,项目名称:TopRate_Materialised,代码行数:13,代码来源:CardFilmDetailsActivity.java

示例9: initActivityTransitions

import android.transition.Slide; //导入方法依赖的package包/类
private void initActivityTransitions() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        getWindow().setEnterTransition(transition);
        getWindow().setReenterTransition(transition);
    }
}
 
开发者ID:xmarianox,项目名称:Subte.io,代码行数:9,代码来源:DetalleLineaActivity.java

示例10: initActivityTransitions

import android.transition.Slide; //导入方法依赖的package包/类
private void initActivityTransitions() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        transition.excludeTarget(R.id.img_preview_dummy, true);
        transition.setInterpolator(new LinearOutSlowInInterpolator());
        transition.setDuration(300);
        getWindow().setEnterTransition(transition);
    }
}
 
开发者ID:jinmiao,项目名称:appcutt,代码行数:11,代码来源:PhotoDetailActivity.java

示例11: initActivityTransition

import android.transition.Slide; //导入方法依赖的package包/类
/**
 * Initializes the activity enter and return transitions of the activity.
 */
private void initActivityTransition() {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
        // Create a new slide transition.
        Slide transition = new Slide();
        transition.excludeTarget(android.R.id.statusBarBackground, true);
        Window window = getWindow();

        // Set the created transition as enter and return transition.
        window.setEnterTransition(transition);
        window.setReturnTransition(transition);
    }
}
 
开发者ID:enviroCar,项目名称:enviroCar-app,代码行数:16,代码来源:TrackDetailsActivity.java

示例12: 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);
  }
}
 
开发者ID:afollestad,项目名称:polar-dashboard,代码行数:48,代码来源:IconMoreActivity.java

示例13: onCreate

import android.transition.Slide; //导入方法依赖的package包/类
@Override
protected void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_transition_second);

    rowContainer = (LinearLayout) findViewById(R.id.row_container2);

    Slide slideExitTransition = new Slide(Gravity.BOTTOM);
    slideExitTransition.excludeTarget(android.R.id.navigationBarBackground, true);
    slideExitTransition.excludeTarget(android.R.id.statusBarBackground, true);


    getWindow().getEnterTransition().addListener(new TransitionAdapter() {

        @Override
        public void onTransitionEnd(Transition transition) {

            super.onTransitionEnd(transition);

            getWindow().getEnterTransition().removeListener(this);

            for (int i = 0; i < rowContainer.getChildCount(); i++) {

                View rowView = rowContainer.getChildAt(i);
                rowView.animate().setStartDelay(i * SCALE_DELAY)
                        .scaleX(1).scaleY(1);
            }
        }
    });
}
 
开发者ID:alicance,项目名称:MyScse-Client,代码行数:32,代码来源:HomeGradeFragmentSecond.java


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