zoukankan      html  css  js  c++  java
  • 锁屏的一些动画

    紧急呼救或者锁屏相机按返回键返回锁屏时,播放的动画是wallpaper_open_exit,如下:

        private boolean setKeyguardOccludedLw(boolean isOccluded) {
            boolean wasOccluded = mKeyguardOccluded;
            boolean showing = mKeyguardDelegate.isShowing();
            if (wasOccluded && !isOccluded && showing) {
                mKeyguardOccluded = false;
                mKeyguardDelegate.setOccluded(false, true /* animate */);
                mStatusBar.getAttrs().privateFlags |= PRIVATE_FLAG_KEYGUARD;
                if (!mKeyguardDelegate.hasLockscreenWallpaper()) {
                    mStatusBar.getAttrs().flags |= FLAG_SHOW_WALLPAPER;
                }
                Animation anim = AnimationUtils.loadAnimation(mContext,
                        com.android.internal.R.anim.wallpaper_open_exit);
                mWindowManagerFuncs.overridePlayingAppAnimationsLw(anim);
                return true;
            } else if (!wasOccluded && isOccluded && showing) {
                mKeyguardOccluded = true;
                mKeyguardDelegate.setOccluded(true, false /* animate */);
                mStatusBar.getAttrs().privateFlags &= ~PRIVATE_FLAG_KEYGUARD;
                mStatusBar.getAttrs().flags &= ~FLAG_SHOW_WALLPAPER;
                return true;
            } else {
                return false;
            }
        }
    

      如果返回过程中会闪现桌面壁纸,可更改该动画,如下:将位移动画注释掉

    <set xmlns:android="http://schemas.android.com/apk/res/android"
            android:shareInterpolator="false" android:zAdjustment="top">
    <!--gome add by jwb-->
        <alpha android:fromAlpha="1.0" android:toAlpha="1.0"
                android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
                android:interpolator="@interpolator/accelerate_quad"
                android:startOffset="250"
                android:duration="500"/>
    
        <!--<translate android:fromYDelta="0" android:toYDelta="110%"
                android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
                android:interpolator="@interpolator/fast_out_linear_in"
                android:duration="225"/>
    
        <scale android:fromXScale="1.0" android:toXScale="1.0"
                android:fromYScale="1.0" android:toYScale="1.0"
                android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true"
                android:pivotX="50%p" android:pivotY="50%p"
                android:interpolator="@interpolator/fast_out_slow_in"
                android:duration="225" />-->
    </set>
    

      

  • 相关阅读:
    activemq学习
    shell变量
    ext3文件系统目录限制问题
    linux性能优化cpu 磁盘IO MEM
    vs2010下编译osip2和eXosip2的4.0.0版的静态库及搭建开发环境
    samba的rpm包,只有tar.gz文件安装
    随记
    mount/umount系统调用
    不定参数的传递VA_LIST的用法
    samba服务器源码安装(非rpm)
  • 原文地址:https://www.cnblogs.com/wangmengran/p/7993674.html
Copyright © 2011-2022 走看看