This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private int mWidth; | |
private int mHeight; | |
private float mCenterX; | |
private float mCenterY; | |
... | |
@Override | |
public void onSurfaceChanged(SurfaceHolder holder, int format, int width, int height) { | |
super.onSurfaceChanged(holder, format, width, height); | |
mWidth = width; | |
mHeight = height; | |
//Genişliği ve yüksekliği ikiye bölerek saatin merkezini hesaplıyoruz. | |
//İşlemlerde float değerler kullanmanız gerekmektedir. | |
mCenterX = mWidth / 2f; | |
mCenterY = mHeight / 2f; | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment