| | |
| | | addView(TextView(context).apply { |
| | | text = "" |
| | | textSize = 20f |
| | | height = resources.getDimensionPixelSize(R.dimen.heatmap_cell_size) |
| | | height = resources.getDimensionPixelSize(R.dimen.heatmap_cell_week_size) |
| | | }) |
| | | dayLabels.forEach { label -> |
| | | val textView = TextView(context).apply { |
| | |
| | | legendLevels.forEach { level -> |
| | | val colorBox = View(context).apply { |
| | | setBackgroundColor(getHeatmapColor(level)) |
| | | val size = resources.getDimensionPixelSize(R.dimen.heatmap_cell_size) |
| | | val size = resources.getDimensionPixelSize(R.dimen.heatmap_cell_legend_size) |
| | | layoutParams = LinearLayout.LayoutParams(size, size).apply { |
| | | marginEnd = 4 |
| | | } |