Closed Cliabhach closed 7 years ago
The first half is covered by #18 and 200fcbc - I'm now investigating potential integration options for the second.
I think I need more layouts and sample integration usages before I can properly assess a way forward with MigratoryRange
s. The second part will have to wait until #7 is complete.
All right, over the past week I've investigated how MigratoryRange
s, Spans, and RecyclerView
s should work within a CVI-style relationship.
Here are my findings:
MigratoryRange
:
MigratoryRange
represents 2 numbers - a start and an end. These live in only 1-dimension.RecyclerView
:
LayeredView
instances - only one int and one float can be passed from showOffsetIndicator
to offsetImageBy
at a timeRecyclerView.ViewHolder
to showOffsetIndicator
would lessen the complexity of methods in e.g. CVIScrollListener
, while complicating such calls in OnViewPagerChangeListener
. There must be a middle ground.And my conclusions:
LayeredTextViewHolder
and other length-based LayeredView
s need different parameters to their offsetImageBy
methods.
offsetImageBy
to offsetContentBy
int
, float
) to (PointF
)StateProxy
CutoutViewIndicator
and LayeredView
View
information directly to the LayeredView
which is representing itMigratorySpan::getCoverage()
should be more grounded
Currently, the
resendPositionInfo
doesn't provide an instance ofCutoutViewIndicator
- this should be resolved.Also, take a look at seeing how
getCurrentPosition
could potentially be implemented usingMigratoryRange
s and perhaps define a standard interaction pattern thereon.