-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add charts #44
base: master
Are you sure you want to change the base?
add charts #44
Conversation
|
||
private val axisPaint = Paint().apply { | ||
style = Paint.Style.STROKE | ||
strokeWidth = 5f |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лучше переводить в dp
|
||
private val strokeOffset = axisPaint.strokeWidth / 2 | ||
|
||
init { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
лучше перенести логику в onFinishInflate , при init может вызывать "лаги" при открытии экрана
payloadItem.copy(date = date, numberDay = numberDay) | ||
} | ||
} catch (e: Exception) { | ||
throw e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
конкретизируйте нейминг
|
||
(0..countColumns).forEachIndexed { index, value -> | ||
canvas?.drawText( | ||
convertLongToTime(firstDay + (index * 24 * 60 * 60)), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я бы все же вынес это из draw , SimpleDateFormat довольно дорогой
No description provided.