diff options
Diffstat (limited to 'src/com/android/dialer/list')
-rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 9 | ||||
-rw-r--r-- | src/com/android/dialer/list/SearchFragment.java | 13 |
2 files changed, 13 insertions, 9 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 78570e168..2ff5a2a5b 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -326,13 +326,8 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste } } - public void maybeShowActionBar() { - // TODO: Try to show the action bar regardless of whether the panel is open, and then update - // the offset to show/hide the action bar, instead of updating the whether the action bar is - // shown in onPanelSlide. - if (mIsPanelOpen && mActionBar != null) { - mActionBar.show(); - } + public boolean shouldShowActionBar() { + return mIsPanelOpen && mActionBar != null; } private void setupPaneLayout(OverlappingPaneLayout paneLayout) { diff --git a/src/com/android/dialer/list/SearchFragment.java b/src/com/android/dialer/list/SearchFragment.java index f863d90ae..9a30c4de6 100644 --- a/src/com/android/dialer/list/SearchFragment.java +++ b/src/com/android/dialer/list/SearchFragment.java @@ -45,6 +45,12 @@ public class SearchFragment extends PhoneNumberPickerFragment { private String mAddToContactNumber; private int mActionBarHeight; + public interface HostInterface { + public boolean isActionBarShowing(); + public int getActionBarHideOffset(); + public int getActionBarHeight(); + } + @Override public void onAttach(Activity activity) { super.onAttach(activity); @@ -69,7 +75,9 @@ public class SearchFragment extends PhoneNumberPickerFragment { getAdapter().setHasHeader(0, false); } - mActionBarHeight = ((DialtactsActivity) getActivity()).getActionBarHeight(); + HostInterface activity = (HostInterface) getActivity(); + + mActionBarHeight = activity.getActionBarHeight(); final View parentView = getView(); parentView.setPaddingRelative( @@ -92,7 +100,8 @@ public class SearchFragment extends PhoneNumberPickerFragment { } }); - if (!getActivity().getActionBar().isShowing()) { + + if (!activity.isActionBarShowing()) { parentView.setTranslationY(-mActionBarHeight); } } |