463acb28faae7a7e7d385822cb3d2c12bac0847d
Collapsing held one of the row's edges -- whichever the tap was nearer -- which is right for opening and wrong for closing: the row that shuts leaves a heading where a screenful of card was, and both its old edges can be a screen's length from the finger that shut it. It now keeps the touched point itself, which for a closed card is the same thing as landing under the hand that closed it. Opening is unchanged and deliberately so: those rows are small, every point in them is within a heading's height of both edges, and the edge pressed is what the reader wants held rather than a fraction of an unbounded expansion. One number carries both readings -- the share of the row's height above the touch, spent as it is on a close and rounded to the nearer edge on an open. The scroll offset the correction asks for goes negative on a close, and has to: that is the list being asked for the rows below what it has composed, which is where the newer content comes from when a card gives a screenful back. It was clamped at zero, which was invisible while every correction was a row growing and is what left closes uncorrected. Checked with ktfmtFormat, compileDebugKotlin, lintDebug and testDebugUnitTest, and on the emulator against the sandbox: a 1441px card closed at a quarter of its height put the collapsed card's top at 743px against 743 predicted, and opening a card by its heading still holds the heading still.
Languages
Rust
53%
Kotlin
44.4%
Shell
2.6%