Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
//Yazacağımız saatin genişliğini ve yüksekliğini alıyoruz ve saate ortalıyoruz.
Rect hourBound = new Rect();
mPaintHourText.getTextBounds(mHour, 0, mHour.length(), hourBound);
canvas.drawText(mHour, mCenterX - (hourBound.width() / 2f), mCenterY + (hourBound.height() / 2f), mPaintHourText);
//Yazacağımız dakikanın genişliğini ve yüksekliğini hesaplayıp saatin yanına yazıyoruz.
Rect minuteBound = new Rect();
mPaintMinuteText.getTextBounds(mMinute, 0, mMinute.length(), minuteBound);
canvas.drawText(mMinute, mCenterX + (mCenterX / 2f), mCenterY + (minuteBound.height() / 2f), mPaintMinuteText);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment