From 781ee24f91f6eb6a1687d803971196f2bf71c02b Mon Sep 17 00:00:00 2001 From: Yorke Lee Date: Thu, 22 May 2014 16:11:25 -0700 Subject: Add padding to bottom of listviews Bug: 15164687 Change-Id: I142e8900b471bfb05cf8dad1ed8b0d8d0e4efae6 --- res/layout/speeddial_fragment.xml | 2 +- res/values/dimens.xml | 4 ++-- src/com/android/dialer/calllog/CallLogFragment.java | 3 +++ src/com/android/dialer/list/AllContactsFragment.java | 9 ++++++++- src/com/android/dialer/list/SearchFragment.java | 8 ++++++++ 5 files changed, 22 insertions(+), 4 deletions(-) diff --git a/res/layout/speeddial_fragment.xml b/res/layout/speeddial_fragment.xml index e8587faeb..f025e6179 100644 --- a/res/layout/speeddial_fragment.xml +++ b/res/layout/speeddial_fragment.xml @@ -40,7 +40,7 @@ android:clipToPadding="false" android:fadingEdge="none" android:divider="@null" - android:paddingBottom="@dimen/floating_action_button_height" + android:paddingBottom="@dimen/floating_action_button_list_bottom_padding" android:nestedScrollingEnabled="true" /> diff --git a/res/values/dimens.xml b/res/values/dimens.xml index 6d7aa84fb..bf0d7bf72 100644 --- a/res/values/dimens.xml +++ b/res/values/dimens.xml @@ -48,9 +48,9 @@ 74dp - 10dp + 16dp - 10dp + 16dp 1dp diff --git a/src/com/android/dialer/calllog/CallLogFragment.java b/src/com/android/dialer/calllog/CallLogFragment.java index 232aa3992..1835b00a9 100644 --- a/src/com/android/dialer/calllog/CallLogFragment.java +++ b/src/com/android/dialer/calllog/CallLogFragment.java @@ -46,6 +46,7 @@ import com.android.common.io.MoreCloseables; import com.android.contacts.common.CallUtil; import com.android.contacts.common.GeoUtil; import com.android.contacts.common.util.PhoneNumberHelper; +import com.android.contacts.common.util.ViewUtil; import com.android.dialer.R; import com.android.dialer.list.ListsFragment.HostInterface; import com.android.dialer.util.EmptyLoader; @@ -552,6 +553,8 @@ public class CallLogFragment extends ListFragment final ListView listView = getListView(); listView.removeFooterView(mFooterView); listView.addFooterView(mFooterView); + + ViewUtil.addBottomPaddingToListViewForFab(listView, getResources()); } @Override diff --git a/src/com/android/dialer/list/AllContactsFragment.java b/src/com/android/dialer/list/AllContactsFragment.java index d05f66d4a..816869ffb 100644 --- a/src/com/android/dialer/list/AllContactsFragment.java +++ b/src/com/android/dialer/list/AllContactsFragment.java @@ -23,13 +23,14 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; +import android.widget.ListView; import android.widget.QuickContactBadge; import com.android.contacts.common.list.ContactEntryListAdapter; import com.android.contacts.common.list.ContactEntryListFragment; import com.android.contacts.common.list.ContactListFilter; -import com.android.contacts.common.list.ContactListItemView; import com.android.contacts.common.list.DefaultContactListAdapter; +import com.android.contacts.common.util.ViewUtil; import com.android.dialer.R; /** @@ -45,6 +46,12 @@ public class AllContactsFragment extends ContactEntryListFragment