History log of /packages/apps/Contacts/src/com/android/contacts/list/ContactTileFrequentFragment.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f7689c377caba183daa41856d01a8c1a2f7ba811 24-Oct-2011 Katherine Kuan <katherinekuan@google.com> Show "no contacts" in frequent list on tablet

- This was already merged in master
https://android-git.corp.google.com/g/#/c/144789/
but needs to be cherry-picked to ics-mr1.
We can't mark it as "do not merge" because
it still needs to be merged to ics-mr1-plus-asop.
When submitting, I'll stand by to manually
say skip if the automerger detects a conflict
when merging to master.

- We need to show "no contacts" under the
"frequently contacted" header in the frequent
fragment in the People app on the tablet.

Since that header was originally the 0th item
in the ListView, to show an empty view we would
either have to:

1) Add a second fake item in the ListView that shows
"No contacts". This requires either returning
view type "empty view" or view type "frequent"
for position = 1 based on the cursor count.
Checking the cursor in getItemViewType()
would make this more than a UI change.

2) Move the "Frequently contacted" header
outside the ListView and make the ContactTileAdapter
show the empty view state when there are 0
frequently contacted people (instead of the
existing implementation which fakes it by returning
1 when the cursor count is 0).

- This CL uses the second option so that we don't
need to add a cursor dependency in getItemViewType()
of ContactTileAdapter.

- Added a TODO because UI changes like this highlight
the fact that we should do some refactoring to
ContactTileAdapter and ContactTileListFragment
so that it's easier to add specific functionality to
the favorites, frequent, or group list.

Bug: 5485640
Change-Id: Ib365543892f452cc9c87406ed2d04c1b5aad4b2c
/packages/apps/Contacts/src/com/android/contacts/list/ContactTileFrequentFragment.java