`
月下独酌
  • 浏览: 130527 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

and14

 
阅读更多
//workspace  
void snapToScreen(int whichScreen) {
//        if (!mScroller.isFinished()) return;

        clearVacantCache();
        enableChildrenCache();

        whichScreen = Math.max(0, Math.min(whichScreen, getChildCount() - 1));
        int index = indexOfScreen(mCurrentGroup, mCurrentScreen);
        boolean changingScreens = whichScreen != index;
        //AAA
        CellLayout cell = null;
        if (DragLayer.isDragging()) {
            if (mDragInfo != null && mDragInfo.cell != null) {
                mDragInfo.cell.setVisibility(View.GONE);            
            }
           
            if (changingScreens) {
                if (mLauncher != null && mLauncher.getDragLayer() != null) {
                    mLauncher.getDragLayer().snap2ScreenWings();
                }
                cell = (CellLayout) getChildAt(whichScreen);
                if (cell != null) {
                    cell.initAnimation();
                }
                cell = (CellLayout) getChildAt(index);
                if (cell != null) {
                    cell.finishZoomOutAnimation();                   
                }
            }
        } else {
            cell = (CellLayout) getChildAt(index);
            if (cell != null) {
                cell.stopAnimation();
            }
        }
       //
        mNextScreen = whichScreen;
      
        //mGroupNavi.updateFocusGroup(computeGroup(mNextScreen));
        //mGroupNavi.lockGroup(true);
      

        View focusedChild = getFocusedChild();
        if (focusedChild != null && changingScreens && focusedChild == getChildAt(mCurrentScreen)) {         
            //focusedChild.clearFocus();      
        }

        final int newX = whichScreen * getWidth();
        final int delta = newX - mScrollX;
      
        final int duration = Math.abs(delta) * 6 / 5;
        mScroller.startScroll(mScrollX, 0, delta, 0, duration);
        //mScroller.startScroll(mScrollX, 0, delta, 0, Math.abs(delta) * 2);

        //final NavigationView nview = (NavigationView)mLauncher.getDrawerNavigator();
        //nview.drawNavigator(correctWhichScreen(delta), duration + 790);

        invalidate();
      
        int flag = Math.max(0, Math.min(mNextScreen, getChildCount() - 1));
        mCurrentGroup = computeGroup(flag);
        mCurrentScreen = computeScreen(flag);
       
    }

分享到:
评论

相关推荐

    Simulation.rar_14bus_39 bus system_MODAL PARAMETER_eigen values

    Modal analysis is to be done for a 9bus,39 bus,30 and 14 bus system .Modal analysis with and without connecting a squirrel cage induction generator to the above mentioned systems has to be done....

    Introduction to Probability and Statistics 14th Edition

    从提供的文件信息来看,所描述的是关于“Introduction to Probability and Statistics 14th Edition”这一教材的概述。该书由William Mendenhall III、Robert J. Beaver和Barbara M. Beaver编著,是一本经典的概率与...

    Wavelets and Filter Banks_MIT

    Lecture 14 Smoothness of Wavelet Bases: Convergence of the Cascade Algorithm (Condition E) Splines Bases vs. Frames Lecture 15 Signal and Image Processing: Finite Length Signals Boundary Filters and ...

    Unity变形插件最新版 Mega-Fiers_2.44.unitypackage

    Fixed missing first target percent value in progressive morphs when using Max 2013 and 14 exporters. Maya exporter updated so only selected blendshape is exported instead of all blendshapes.

    msp430fg43X.pdf

    Also included is a built-in 16-bit timer, 128 LCD segment drive capability, and 14 I/O pins. Typical applications include 2-wire and 3-wire single-phase metering including tamper-resistant meter ...

    PIC16F639PIC12F635_PIC16F636_639_Data_Sheet

    - They are available in both 8-pin and 14-pin packages, offering flexibility in design and integration. 3. **Flash-Based Memory:** - The flash memory provides non-volatile storage, allowing the MCU ...

    Python for Information

    - **October 2013**: Major revisions were made to Chapters 13 and 14 to incorporate JSON and OAuth. - **December 2009**: Significant changes were made to chapters 2-10 based on "Think Python: How to ...

    python原文教程

    - **Further Revisions (October 2013)**: Chapters 13 and 14 were significantly updated to include JSON and OAuth, and a new chapter on Visualization was added. - **Publication History**: The book has...

    Data Structures, Algorithms and Applications in C++ Second Edition

    Chapter 14 Binary Search Trees Chapter 15 Balanced Search Trees Chapter 16 Graphs Part III Algorithm Design Methods Chapter 17 The Greedy Method Chapter 18 Divide and Conquer Chapter 19 Dynamic ...

    Practical Android :14 Complete Projects on Advanced Techniques and Approaches

    Developers will appreciate this approach because it enables them to focus on their apps, and not waste time trying to integrate code snippets or troubleshoot environment setup issues. Practical ...

    AD8629ARZ-REEL7 ADI芯片 电子元器件中文版规格手册.pdf

    * 14-Lead SOIC_N (R-14) and 14-Lead TSSOP (RU-14) 一般描述 AD8629ARZ-REEL7芯片具有超低偏移、漂移和偏置电流。该芯片是宽带宽自动零点放大器,具有铁轨输入和输出摆幅,低噪声。操作完全规格化自2.7 V到5 V单...

    AD8628ARTZ-REEL7 ADI芯片 电子元器件中文版规格手册.pdf

    * 14-Lead SOIC_N (R-14) and 14-Lead TSSOP (RU-14) 一般描述 AD8628/AD8629/AD8630是一款超低偏移、漂移和偏置电流的放大器,具有铁轨输入和输出摆动。该芯片可以在2.7 V到5 V单电源(±1.35 V到±2.5 V双电源)...

    Practical Android 14 Complete Projects on Advanced Techniques and epub

    Practical Android 14 Complete Projects on Advanced Techniques and Approaches 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书

Global site tag (gtag.js) - Google Analytics