本文整理汇总了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);
}
示例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: 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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
示例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);
}
}
});
}