Loading src/com/android/dialer/list/ListsFragment.java +7 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste private ShortcutCardsAdapter mMergedAdapter; private CallLogAdapter mCallLogAdapter; private CallLogQueryHandler mCallLogQueryHandler; private OverlappingPaneLayout mOverlappingPaneLayout; private boolean mIsPanelOpen = true; Loading Loading @@ -302,6 +303,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mRemoveViewContent = parentView.findViewById(R.id.remove_view_content); setupPaneLayout((OverlappingPaneLayout) parentView); mOverlappingPaneLayout = (OverlappingPaneLayout) parentView; return parentView; } Loading @@ -322,6 +324,11 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mCallLogAdapter.changeCursor(cursor); mMergedAdapter.notifyDataSetChanged(); // Refresh the overlapping pane to ensure that any changes in the shortcut card height // are appropriately reflected in the overlap position. mOverlappingPaneLayout.refresh(); // Return true; took ownership of cursor return true; } Loading src/com/android/dialer/widget/OverlappingPaneLayout.java +16 −0 Original line number Diff line number Diff line Loading @@ -717,6 +717,22 @@ public class OverlappingPaneLayout extends ViewGroup { return wantTouchEvents; } /** * Refreshes the {@link OverlappingPaneLayout} be attempting to re-open or re-close the pane. * This ensures that the overlapping pane is repositioned based on any changes to the view * which is being overlapped. * <p> * The {@link #openPane()} and {@link #closePane()} methods do not perform any animation if the * pane has already been positioned appropriately. */ public void refresh() { if (isOpen()) { openPane(); } else { closePane(); } } private boolean closePane(View pane, int initialVelocity) { if (mFirstLayout || smoothSlideTo(0.f, initialVelocity)) { mPreservedOpenState = false; Loading Loading
src/com/android/dialer/list/ListsFragment.java +7 −0 Original line number Diff line number Diff line Loading @@ -90,6 +90,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste private ShortcutCardsAdapter mMergedAdapter; private CallLogAdapter mCallLogAdapter; private CallLogQueryHandler mCallLogQueryHandler; private OverlappingPaneLayout mOverlappingPaneLayout; private boolean mIsPanelOpen = true; Loading Loading @@ -302,6 +303,7 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mRemoveViewContent = parentView.findViewById(R.id.remove_view_content); setupPaneLayout((OverlappingPaneLayout) parentView); mOverlappingPaneLayout = (OverlappingPaneLayout) parentView; return parentView; } Loading @@ -322,6 +324,11 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mCallLogAdapter.changeCursor(cursor); mMergedAdapter.notifyDataSetChanged(); // Refresh the overlapping pane to ensure that any changes in the shortcut card height // are appropriately reflected in the overlap position. mOverlappingPaneLayout.refresh(); // Return true; took ownership of cursor return true; } Loading
src/com/android/dialer/widget/OverlappingPaneLayout.java +16 −0 Original line number Diff line number Diff line Loading @@ -717,6 +717,22 @@ public class OverlappingPaneLayout extends ViewGroup { return wantTouchEvents; } /** * Refreshes the {@link OverlappingPaneLayout} be attempting to re-open or re-close the pane. * This ensures that the overlapping pane is repositioned based on any changes to the view * which is being overlapped. * <p> * The {@link #openPane()} and {@link #closePane()} methods do not perform any animation if the * pane has already been positioned appropriately. */ public void refresh() { if (isOpen()) { openPane(); } else { closePane(); } } private boolean closePane(View pane, int initialVelocity) { if (mFirstLayout || smoothSlideTo(0.f, initialVelocity)) { mPreservedOpenState = false; Loading