Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

add charts #44

wants to merge 1 commit into from

Conversation

lewan42
Copy link

@lewan42 lewan42 commented Feb 24, 2023

No description provided.


private val axisPaint = Paint().apply {
style = Paint.Style.STROKE
strokeWidth = 5f

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 {

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

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)),

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

я бы все же вынес это из draw , SimpleDateFormat довольно дорогой

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants