From 492cd7371c6d8fddc4de85887a4ed9a89d602767 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Wed, 8 Apr 2015 14:58:45 -0700 Subject: Replace ListView with RecyclerView in call log. Yay, finally! + Replace ListView with RecyclerView in layout and fragment files. + Change GroupingListAdapter to extend RecyclerView.Adapter instead of BaseAdapter. + Change CallLogListItemViews to extend RecyclerView.ViewHolder. + Adapt onBindViewHolder and onCreateViewHolder methods in the CallLogAdapter. + Update/rework tests for related classes. + Fix a bug in the GroupingListAdapter, where childCount was not updated for standalone views, and the previously cached group size was used instead. Set childCount to 1 for standalone views. - Removed the idea of creating different views for standalone vs group vs group headers from the adapters. This logic has not been used for quite some time and all these functions funneled into createView/bindView methods anyways, so there is no logical difference. If we need to create custom views in the future, we can leverage onCreateViewHolder's viewType parameter. Bug: 19372817 Change-Id: I1b7289340600609669db22d8bc89265240d0b561 --- res/layout/call_log_fragment.xml | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'res/layout/call_log_fragment.xml') diff --git a/res/layout/call_log_fragment.xml b/res/layout/call_log_fragment.xml index 74c630959..c126b778b 100644 --- a/res/layout/call_log_fragment.xml +++ b/res/layout/call_log_fragment.xml @@ -61,18 +61,11 @@ - - + android:background="@color/background_dialer_list_items" />