zoukankan      html  css  js  c++  java
  • [Code Snipper]图片轮换

     1 // 左右滚动算法,类似广告效果
     2 public void twinklingBasketGifProgress() {
     3     ProcessScreen processScreen=(ProcessScreen) Session.current.getNavigator().getCurrentScreen();
     4     final Handler twinkNameHandler = processScreen.getCurrentHandler();
     5     Runnable twinkNameTask = new Runnable() {
     6         private boolean isForward = true;
     7         private int twinkTimes = 0;
     8         @Override
     9         public void run() {
    10             if (currentTwinklingIndex == twinklingBasketGif.length - 1) {
    11                 isForward = false;
    12             }else if (currentTwinklingIndex == 0){
    13                 isForward = true;
    14                 twinkTimes ++;
    15             }
    16             if (isForward) {
    17                 currentTwinklingIndex++;
    18             } else {
    19                 currentTwinklingIndex--;
    20             }
    21             myTaskbarImage.setImageResource(twinklingBasketGif[currentTwinklingIndex]);
    22             if (twinkTimes <= 2) {
    23                 twinkNameHandler.postDelayed(this, 100);
    24             }else {
    25                 myTaskbarImage.setImageBitmap(defaultBasketIcon);
    26                 currentTwinklingIndex = -1;
    27             }
    28             Log.e("", currentTwinklingIndex + ""); 
    29         }
    30     };
    31     twinkNameHandler.postDelayed(twinkNameTask, 100);
    32 }

  • 相关阅读:
    linux 通配符
    linux 常用快捷键
    datatables-2
    datables
    datatables
    http://blog.csdn.net/heqingsong1/article/details/8540665
    软件提升知识点
    深入浅出单实例Singleton设计模式
    详解js跨域问题
    自定义控件之绘图篇(四):canvas变换与操作
  • 原文地址:https://www.cnblogs.com/cokepanm/p/2487110.html
Copyright © 2011-2022 走看看