summaryrefslogtreecommitdiff
path: root/src/com/android/dialer/list/ListsFragment.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/com/android/dialer/list/ListsFragment.java')
-rw-r--r--src/com/android/dialer/list/ListsFragment.java17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java
index 18fa531c0..250706561 100644
--- a/src/com/android/dialer/list/ListsFragment.java
+++ b/src/com/android/dialer/list/ListsFragment.java
@@ -89,6 +89,8 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste
private CallLogAdapter mCallLogAdapter;
private CallLogQueryHandler mCallLogQueryHandler;
+ private boolean mIsPanelOpen = true;
+
/**
* Call shortcuts older than this date (persisted in shared preferences) will not show up in
* at the top of the screen
@@ -143,15 +145,21 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste
final int availableActionBarHeight =
Math.min(mActionBar.getHeight(), topPaneHeight);
mActionBar.setHideOffset(mActionBar.getHeight() - availableActionBarHeight);
+
+ if (!mActionBar.isShowing()) {
+ mActionBar.show();
+ }
}
}
@Override
public void onPanelOpened(View panel) {
+ mIsPanelOpen = true;
}
@Override
public void onPanelClosed(View panel) {
+ mIsPanelOpen = false;
}
};
@@ -335,6 +343,15 @@ 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.show();
+ }
+ }
+
private void setupPaneLayout(OverlappingPaneLayout paneLayout) {
// TODO: Remove the notion of a capturable view. The entire view be slideable, once
// the framework better supports nested scrolling.