Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18069] Android: make ListSection.getItemCount() and/or getContentCount() public

GitHub Issuen/a
TypeImprovement
PriorityCritical
StatusClosed
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sRelease 9.3.0
Componentsn/a
LabelsengSchedule, listsection, listview, search, searchbar, searchview
ReporterFar
AssigneeGary Mathews
Created2014-11-20T15:00:17.000+0000
Updated2020-11-20T00:25:07.000+0000

Description

For now it is not possible to get count if items inside list (or section) filtered by search view on android. ListSection.itemCount is avaliable for iOS (however not documented) but not for android.

Comments

  1. Far 2014-11-21

    It will be nice to get filtered items also.
  2. Shuo Liang 2014-11-21

    Thank you for your suggestion. We will consider about it.
  3. Far 2014-11-23

    I wrote small plugin to access search item count https://github.com/farwayer/TiListSearchItems Maybe it will be useful to somebody.
  4. Michael Gangolf 2018-05-13

    PR for Android: https://github.com/appcelerator/titanium_mobile/pull/10040 It will add itemCount/getItemCount to ListSection for Android
  5. Christopher Williams 2020-07-31

    I've rebased the PR, added unit tests, cleaned up commit messages and altered to expose as Ti.UI.ListSection.filteredItemCount on Android. I *did not* implement a Ti.UI.ListSection.filteredItemCount on iOS, nor did I expose an Ti.UI.ListSection.itemCount on Android. I suspect for parity we'd want both to be done. The latter is likely pretty easy, but the iOS filtered item count may be more involved as the filter results are calculated on the ListView and aren't really "shared" down to the ListSection cc [~vijaysingh]
  6. Joshua Quick 2020-07-31

    As a heads up, the Android ListView is going to be 100% rewritten to use RecyclerView in the near future, making this PR irrelevant. We can keep the feature request ticket, but it will have to be re-implemented.
  7. Gary Mathews 2020-10-26

    master: https://github.com/appcelerator/titanium_mobile/pull/12029

JSON Source