summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorAndrew Lee <anwlee@google.com>2015-04-08 14:58:45 -0700
committerAndrew Lee <anwlee@google.com>2015-04-09 18:43:12 -0700
commit492cd7371c6d8fddc4de85887a4ed9a89d602767 (patch)
tree14c9ea0382ea342cde7dcc86ff17af223e93d23d /res
parent69748953bc507fc8c02ad401f51b7df2efd77688 (diff)
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
Diffstat (limited to 'res')
-rw-r--r--res/layout/call_log_fragment.xml13
1 files changed, 3 insertions, 10 deletions
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 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
- <!-- clipChildren=false is required to ensure shadows drawn
- within list items aren't clipped by the list item bounds. -->
- <ListView android:id="@android:id/list"
+
+ <android.support.v7.widget.RecyclerView android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:fadingEdge="none"
- android:scrollbarStyle="outsideOverlay"
- android:background="@color/background_dialer_list_items"
- android:divider="@null"
- android:nestedScrollingEnabled="true"
- android:clipChildren="false"
- />
+ android:background="@color/background_dialer_list_items" />
<include
android:id="@+id/empty_list_view"