From 23bdb192ff3690bf90a1eeb8c6145f0cb8494d58 Mon Sep 17 00:00:00 2001 From: Lucas Legrand Date: Fri, 27 Jul 2018 14:49:38 +0200 Subject: [PATCH] ContactsListFragment ListView converted to RecyclerView, Adapter/ViewHolder are now located into a separate Class ContactsListAdapter, all features before conversion are available. This fragment now uses SelectableHelper/Adapter. All fragments converted to RecyclerView now have a divider between items of a list. TODO: convert HistoryListFragment ListView into RecyclerView. --- res/drawable/divider.xml | 7 + res/drawable/line.xml | 12 + res/drawable/line_drawable.xml | 9 + res/layout/contact_cell.xml | 1 + res/layout/contacts_list.xml | 12 +- res/values/styles.xml | 12 +- .../linphone/chat/ChatCreationFragment.java | 9 + .../org/linphone/chat/ChatEventsAdapter.java | 1 - .../org/linphone/chat/ChatListFragment.java | 10 + .../org/linphone/chat/GroupChatFragment.java | 2 + .../org/linphone/chat/GroupInfoFragment.java | 11 +- .../contacts/ContactsListAdapter.java | 144 ++-------- .../contacts/ContactsListFragment.java | 262 +++++++++++------- .../org/linphone/ui/SelectableAdapter.java | 25 +- .../org/linphone/ui/SelectableHelper.java | 2 +- 15 files changed, 270 insertions(+), 249 deletions(-) create mode 100644 res/drawable/divider.xml create mode 100644 res/drawable/line.xml create mode 100644 res/drawable/line_drawable.xml diff --git a/res/drawable/divider.xml b/res/drawable/divider.xml new file mode 100644 index 000000000..9afcc7d80 --- /dev/null +++ b/res/drawable/divider.xml @@ -0,0 +1,7 @@ + + + + \ No newline at end of file diff --git a/res/drawable/line.xml b/res/drawable/line.xml new file mode 100644 index 000000000..e3f2eaacf --- /dev/null +++ b/res/drawable/line.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/res/drawable/line_drawable.xml b/res/drawable/line_drawable.xml new file mode 100644 index 000000000..de26172a6 --- /dev/null +++ b/res/drawable/line_drawable.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/res/layout/contact_cell.xml b/res/layout/contact_cell.xml index 5642cfb3b..cec07d952 100644 --- a/res/layout/contact_cell.xml +++ b/res/layout/contact_cell.xml @@ -69,6 +69,7 @@ android:layout_alignParentRight="true" android:layout_centerInParent="true" android:visibility="gone" + android:clickable="false" android:paddingLeft="5dp" android:paddingRight="5dp" /> diff --git a/res/layout/contacts_list.xml b/res/layout/contacts_list.xml index 29c5a8d86..fe9c7c8da 100644 --- a/res/layout/contacts_list.xml +++ b/res/layout/contacts_list.xml @@ -2,8 +2,9 @@ + android:orientation="vertical"> + @drawable/fast_scroll @android:color/white @drawable/fast_scroll_preview - true - +