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


Java Visibility类代码示例

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


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

示例1: onCreate

import android.transition.Visibility; //导入依赖的package包/类
@Override
    protected void onCreate(Bundle savedInstanceState) {
//        getWindow().requestFeature(Window.FEATURE_CONTENT_TRANSITIONS);
        super.onCreate(savedInstanceState);
        Slide slideIn = new Slide();
        slideIn.setDuration(500);
        //设置为进入
        slideIn.setMode(Visibility.MODE_IN);
        //设置从右边进入
        slideIn.setSlideEdge(Gravity.RIGHT);
        getWindow().setEnterTransition(new ChangeImageTransform().setDuration(3000));
//        getWindow().setEnterTransition(new Explode().setDuration(2000));
//        getWindow().setExitTransition(new Explode().setDuration(2000));
        Slide slideReturn =new Slide();
        slideReturn.setDuration(500);
        slideReturn.setSlideEdge(Gravity.LEFT);
        slideReturn.setMode(Visibility.MODE_OUT);
        getWindow().setReturnTransition (slideReturn );
        setContentView(R.layout.activity_img_transition);
        mImageView = (ImageView) findViewById(R.id.img);

//        Transition sharedElementEnterTransition = getWindow().getSharedElementEnterTransition();

    }
 
开发者ID:teisun,项目名称:SunmiUI,代码行数:25,代码来源:ImageSharedTransitionActivity.java

示例2: setupCardFlipTransition

import android.transition.Visibility; //导入依赖的package包/类
private void setupCardFlipTransition() {
    CardFlipTransition flipIn = new CardFlipTransition();
    flipIn.setDuration(500);
    flipIn.setMode(Visibility.MODE_IN);
    flipIn.addTarget(R.id.big_card);
    flipIn.excludeTarget(android.R.id.navigationBarBackground, true);
    flipIn.excludeTarget(android.R.id.statusBarBackground, true);

    getWindow().setEnterTransition(flipIn);

    CardFlipTransition flipOut = new CardFlipTransition();
    flipOut.setMode(Visibility.MODE_OUT);
    flipOut.setDuration(500);
    flipOut.addTarget(R.id.big_card);
    flipOut.excludeTarget(android.R.id.navigationBarBackground, true);
    flipOut.excludeTarget(android.R.id.statusBarBackground, true);

    getWindow().setExitTransition(flipOut);
}
 
开发者ID:suzp1984,项目名称:AndroidFlipCardTransition,代码行数:20,代码来源:BigCardActivity.java

示例3: setupCardFlipTransition

import android.transition.Visibility; //导入依赖的package包/类
private void setupCardFlipTransition() {
    CardFlipTransition flipOut = new CardFlipTransition();
    flipOut.setDuration(500);
    flipOut.setMode(Visibility.MODE_OUT);
    flipOut.addTarget(R.id.text_card);
    flipOut.excludeTarget(android.R.id.navigationBarBackground, true);
    flipOut.excludeTarget(android.R.id.statusBarBackground, true);

    getWindow().setExitTransition(flipOut);

    CardFlipTransition flipIn = new CardFlipTransition();
    flipIn.setDuration(500);
    flipIn.setMode(Visibility.MODE_IN);
    flipIn.addTarget(R.id.text_card);
    flipIn.excludeTarget(android.R.id.navigationBarBackground, true);
    flipIn.excludeTarget(android.R.id.statusBarBackground, true);

    getWindow().setEnterTransition(flipIn);

}
 
开发者ID:suzp1984,项目名称:AndroidFlipCardTransition,代码行数:21,代码来源:FlipCardTransitionActivity.java

示例4: buildEnterTransition

import android.transition.Visibility; //导入依赖的package包/类
private Visibility buildEnterTransition() {
    Fade enterTransition = new Fade();
    enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));
    // This view will not be affected by enter transition animation
    enterTransition.excludeTarget(R.id.square_red, true);
    return enterTransition;
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:8,代码来源:TransitionActivity1.java

示例5: buildEnterTransition

import android.transition.Visibility; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
protected Visibility buildEnterTransition() {
    Slide enterTransition = new Slide();
    enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_medium));
    enterTransition.setSlideEdge(Gravity.RIGHT); //从右边滑动进入
    return enterTransition;
}
 
开发者ID:huxizhijian,项目名称:HHComicViewer,代码行数:8,代码来源:OfflineDownloadBaseActivity.java

示例6: buildEnterTransition

import android.transition.Visibility; //导入依赖的package包/类
private Visibility buildEnterTransition() {
    Slide enterTransition = new Slide();
    enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));
    enterTransition.setSlideEdge(Gravity.RIGHT);
    return enterTransition;
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:7,代码来源:TransitionActivity3.java

示例7: setupWindowAnimations

import android.transition.Visibility; //导入依赖的package包/类
private void setupWindowAnimations() {
    Visibility enterTransition = buildEnterTransition();
    getWindow().setEnterTransition(enterTransition);
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:5,代码来源:TransitionActivity1.java

示例8: buildReturnTransition

import android.transition.Visibility; //导入依赖的package包/类
private Visibility buildReturnTransition() {
    Visibility enterTransition = new Slide();
    enterTransition.setDuration(getResources().getInteger(R.integer.anim_duration_long));
    return enterTransition;
}
 
开发者ID:shenhuanet,项目名称:AndroidOpen,代码行数:6,代码来源:TransitionActivity1.java


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