import android.view.View;
public class LengthCalculate {
public static final int STATEBAR_HEIGHT = 53;
public static final int GREEN_RECT_TOP_OFFSET = 5;
public static final int GROUP_NAVIGATION_OFFSET = 2;
private static final int DRAG_WINGS_HEIGHT = 300;
private static final LengthCalculate me = new LengthCalculate();
private int groupHeight;
public static LengthCalculate getInstance() {
return me;
}
public int getGroupHeight() {
return groupHeight;
}
public int getDragWingsHeight() {
return DRAG_WINGS_HEIGHT;
}
public void setGroupHeight(int groupHeight) {
this.groupHeight = groupHeight;
}
public int getLauncherContentHeight(int dragLayerHeight) {
return dragLayerHeight - STATEBAR_HEIGHT - groupHeight;
}
public int getLauncherContentContenY(int dragLayerHeight) {
return getLauncherContentHeight(dragLayerHeight) / 2;
}
public int getCenterPointX(View view) {
return view.getWidth() / 2;
}
public int getCenterPointY(View view) {
return (view.getHeight() - getGroupHeight()) / 2;
}
}
分享到:
相关推荐
Moore’s law continues unabated and new design challenges lead to new design methodologies and even paradigm shifts. One such recent development is the introduction of three-dimensional integration ...
标题中的"xlnx_auto_0_xdb.rar_and3"暗示这可能是一个与Xilinx相关的设计文件,用于创建一个32位的AND门电路。AND门是一种基本的数字逻辑门,它只有当所有输入都为高(1)时,输出才为高。 `xdb`文件是Xilinx ...
Single-file implementations of 2D and 3D acoustic and elastic wave propagation in time domain using finite-differences(FDTD). Simple formulation and implementation.zip
UDEC and 3DEC 学习资料:介绍和建模过程
C# in Depth_ What you need to master C# 2 and 3.rar C# in Depth_ What you need to master C# 2 and 3.rar
UDEC and 3DEC 学习资料:介绍和建模过程
UDEC and 3DEC 学习资料:介绍和建模过程
Define a two-dimensional long integer array A of 3 rows and 4 columns. Fill the elements of the arrays with the numbers 1 - 12 in the order 1 2 3 4 5 6 7 8 9 10 11 12 Define another array B that will ...
keygen for visual SVN 2.x and it seems to work also on 3.x
Chapter 3 discusses examples of coordinate spaces and how they are nested in a hierarchy. Chapter 4 introduces vectors and explains the geometric and mathematical interpretations of vectors. ...
Chapter 3 Reading and Writing Data with Python Chapter 4 Webdev 101 Chapter 5 Getting Data off the Web with Python Chapter 6 Development Setup Chapter 7 A Language-Learning Bridge Between Python and ...
State of the art charts, 2D and 3D. Beautiful, Responsive and Interactive. Completely customizable from the editor and does not require even one line of code. Can be used within any platform including...
Discusses methods in the registration of long videos in target tracking and 3-D reconstruction Addresses key research topics and explores potential solutions to a number of open problems in image ...
HTML5 Gamesshows you how to combine HTML5, CSS3 and JavaScript to make games for the web and mobiles - games that were previously only possible with plugin technologies like Flash. Using the latest ...
The PowerShell Toolkit for HPE Primera and HPE 3PAR supports cmdlets, which are wrappers around the native HPE Primera and HPE 3PAR storage CLI commands and HPE 3PAR storage Web Services API (WSAPI).