[TIMOB-28327] Android: Parity for ListView's "selectionStyle" and "[de]selectItem" methods
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | None |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2021-09-10T09:28:30.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 10.1.0 |
Components | Android, iOS |
Labels | parity |
Reporter | Hans Knöchel |
Assignee | Gary Mathews |
Created | 2021-01-25T12:33:08.000+0000 |
Updated | 2021-09-10T09:28:30.000+0000 |
Description
This is a conditional code scenario that we have since day one: Designing a non-clickable cell on iOS and Android, ending up doing the following:
{
properties: {
selectionStyle: OS_ANDROID ? undefined : Ti.UI.iOS.ListViewCellSelectionStyle.NONE
}
}
What this ticket aims for is to move Ti.UI.iOS.ListViewCellSelectionStyle.NONE
to Ti.UI.ListViewCellSelectionStyle.NONE
, add Android parity and also deprecate the existing iOS constants Ti.UI.iOS.ListViewCellSelectionStyle.BLUE
and Ti.UI.iOS.ListViewCellSelectionStyle.GRAY
in favor of Ti.UI.ListViewCellSelectionStyle.DEFAULT
(which is selectable in reflects the current behavior of iOS and Android).
Finally (and less critical), Android should support the selectItem(...)
and deselectItem(...)
properties which is used to manually set a selection (using selectItem
)) or clear a selection after tapping a selectable cell (using deselectItem
).
For us this would fix 39+ conditional statements immediately.
master: https://github.com/appcelerator/titanium_mobile/pull/12769