//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);
}
分享到:
相关推荐
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”这一教材的概述。该书由William Mendenhall III、Robert J. Beaver和Barbara M. Beaver编著,是一本经典的概率与...
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 ...
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.
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 ...
- 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 ...
- **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 ...
- **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...
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 ...
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 ...
* 14-Lead SOIC_N (R-14) and 14-Lead TSSOP (RU-14) 一般描述 AD8629ARZ-REEL7芯片具有超低偏移、漂移和偏置电流。该芯片是宽带宽自动零点放大器,具有铁轨输入和输出摆幅,低噪声。操作完全规格化自2.7 V到5 V单...
* 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 Approaches 英文epub 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书