MCPcopy Index your code
hub / github.com/AndroidDeveloperLB/ListViewVariants

github.com/AndroidDeveloperLB/ListViewVariants @1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 1 ↗ · + Follow
174 symbols 350 edges 17 files 34 documented · 20%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

ListViewVariants

Provides special ways to handle ListViews, including PinnedHeaderListView in Lollipop's Contacts-app style

Screenshot

Here's a screenshot of how it shows the contacts of the device, very similar to how Lollipop's Contacts-app shows it , except for the blur, which I've added myself ... :)

animated demo

enter image description here

Requirements

The min API level is 8.

Also, in case you wish to use any class that causes the headers to be ordered, you must sort the items accordingly.

In case the headers should all be in uppercase, the sorting should make sure that items that start with each letter (uppercase or not) will be together (for example "Dan" and "duke" should be together on the same chunk that belongs to "D").

Known Issues

  1. Missing some documentations and also some samples. Hope to work on this when I get the time. :)
  2. RTL alignment on the headers (of the sample) isn't supported yet. Maybe it's a simple matter to fix. However, this doesn't mean that it won't work on RTL locale of the device. Just not that the UI components will get mirrored (meaning it will look exactly like for English locale, for example) ...

Note

There is another nice alternative library for RecyclerView, here: https://github.com/TonicArtos/SuperSLiM

Extension points exported contracts — how you extend this code

PinnedHeaderAdapter (Interface)
Adapter interface. The list adapter must implement this interface.
library/src/main/java/lb/library/PinnedHeaderListView.java
IOnFinishedListener (Interface)
(no doc) [1 implementers]
app/src/main/java/lb/listviewvariants/utils/async_task_thread_pool/AsyncTaskEx.java
ContactsQuery (Interface)
(no doc)
app/src/main/java/lb/listviewvariants/utils/ContactsQuery.java

Core symbols most depended-on inside this repo

get
called by 11
app/src/main/java/lb/listviewvariants/utils/async_task_thread_pool/AsyncTaskEx.java
getSections
called by 4
library/src/main/java/lb/library/BaseSectionedAdapter.java
resetValuesState
called by 4
app/src/main/java/lb/listviewvariants/utils/CircularContactView.java
isCancelled
called by 4
app/src/main/java/lb/listviewvariants/utils/async_task_thread_pool/AsyncTaskEx.java
getPositionForSection
called by 3
library/src/main/java/lb/library/BasePinnedHeaderListViewAdapter.java
toString
called by 3
library/src/main/java/lb/library/SectionedSectionIndexer.java
getOriginalList
called by 3
library/src/main/java/lb/library/SearchablePinnedHeaderListViewAdapter.java
decodeSampledBitmapFromDescriptor
called by 3
app/src/main/java/lb/listviewvariants/utils/ContactImageUtil.java

Shape

Method 145
Class 25
Interface 3
Enum 1

Languages

Java100%

Modules by API surface

app/src/main/java/lb/listviewvariants/utils/async_task_thread_pool/AsyncTaskEx.java33 symbols
app/src/main/java/lb/listviewvariants/MainActivity.java24 symbols
library/src/main/java/lb/library/SectionedSectionIndexer.java16 symbols
library/src/main/java/lb/library/BasePinnedHeaderListViewAdapter.java14 symbols
library/src/main/java/lb/library/PinnedHeaderListView.java12 symbols
library/src/main/java/lb/library/BaseSectionedAdapter.java11 symbols
app/src/main/java/lb/listviewvariants/utils/CircularContactView.java11 symbols
library/src/main/java/lb/library/SearchablePinnedHeaderListViewAdapter.java10 symbols
app/src/main/java/lb/listviewvariants/utils/ImageCache.java8 symbols
library/src/main/java/lb/library/StringArrayAlphabetIndexer.java7 symbols
app/src/main/java/lb/listviewvariants/utils/async_task_thread_pool/AsyncTaskThreadPool.java6 symbols
library/src/main/java/lb/library/IndexedPinnedHeaderListViewAdapter.java5 symbols

For agents

$ claude mcp add ListViewVariants \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact