question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting of day width/height

See original GitHub issue

It seems like it’s impossible to change the width and height of the day cells independent of one another. From what I can tell, setting either the height or width turns off autoSize. I feel like the API mislead me into thinking I could reduce the space between rows (while keeping the width the same) by simply changing the height because they are separate properties.

Perhaps it should be one method that accepts width and height instead?

While a single function would be a step in the right direction, I think this way of setting the cell size is a bit confusing. I expected the library to respect the height and width set on the dayViewRes, but instead it ignores it, sets it to match_parent, and uses dayWidth and dayHeight from CalendarView as the sources of truth.

I think this is a bit of a gotcha and it would be helpful to have this behavior documented. Ideally, the user’s layout determines the cell size.

For anyone wondering how to reduce the space between rows, here’s how I did it:

// View.doOnPreDraw is found in core-ktx
doOnPreDraw {
  dayWidth = calendarView.width / 7
  dayHeight = (dayWidth * .666).toInt()
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
kizitonwosecommented, Jul 22, 2020

Would you mind if we moved this discussion to a new issue? It’ll keep me from getting confused and keep the issues focused.

Created #187

0reactions
kizitonwosecommented, Jul 23, 2020

I left a pretty lengthy and detailed commit message on it if you want to take a look.

Yes, I’ll definitely take a look sometime. Removing the inner framelayout is already a huge win as there would be approx 30 of those in a single month. The inner layouts would only be about 4 per month but would still be great if we can get rid of them.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change the column width and row height - Microsoft Support
Individual rows and columns can only have one setting. For example, a single column can have a 25 point width, but it can't...
Read more >
Setting of day width/height · Issue #184 · kizitonwose/Calendar
It seems like it's impossible to change the width and height of the day cells independent of one another. From what I can...
Read more >
Adjust Row Height and Column Width in Word Tables
To do this, first select the cells whose width or height you wish to adjust. Then use the “Height:” and “Width:” spinner boxes...
Read more >
Setting Column Width or Row Height - Aspose Documentation
This topic discusses setting the column width and row height using the Aspose.Cells.GridDesktop API. Sometimes, worksheet cells contain values that are ...
Read more >
Setting Column Width and Row Height - LongRange
Setting Column Width and Row Height. How do you tell LongRange that you want the first column to occupy 20% of the form's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found