diff options
| author | Andrew Lee <anwlee@google.com> | 2015-03-06 12:06:31 -0800 |
|---|---|---|
| committer | Andrew Lee <anwlee@google.com> | 2015-03-06 14:30:43 -0800 |
| commit | dc500de99ccb42393d6dae3ecf4748b560775019 (patch) | |
| tree | 420e9d38af0462a58e37590ed9c203dd350fbc98 /src/com/android/dialer/list | |
| parent | 8321e39655e1586c752dcd3622aba3d04e5576a7 (diff) | |
| download | packages_apps_Dialer-dc500de99ccb42393d6dae3ecf4748b560775019.tar.gz packages_apps_Dialer-dc500de99ccb42393d6dae3ecf4748b560775019.tar.bz2 packages_apps_Dialer-dc500de99ccb42393d6dae3ecf4748b560775019.zip | |
Remove OverlappingPaneLayout.
- Remove the OverlappingPaneLayout, which is no longer needed
since the recents card has been removed.
- Known Issue: SearchBar is no longer hidden on scroll.
- Known Issue: shouldShowActionBar does not return correct value.
I plan to fix these KIs in a follow up CL, but going for incremental
changes for now to try to keep it apparent what is being done.
Bug: 19372817
Change-Id: I9ae1ca19820c87f252863074a5bcab6923b03558
Diffstat (limited to 'src/com/android/dialer/list')
| -rw-r--r-- | src/com/android/dialer/list/ListsFragment.java | 89 |
1 files changed, 2 insertions, 87 deletions
diff --git a/src/com/android/dialer/list/ListsFragment.java b/src/com/android/dialer/list/ListsFragment.java index 098b647a1..45b2f689d 100644 --- a/src/com/android/dialer/list/ListsFragment.java +++ b/src/com/android/dialer/list/ListsFragment.java @@ -31,8 +31,6 @@ import com.android.dialer.calllog.CallLogQueryHandler; import com.android.dialer.calllog.ContactInfoHelper; import com.android.dialer.util.DialerUtils; import com.android.dialer.widget.ActionBarController; -import com.android.dialer.widget.OverlappingPaneLayout; -import com.android.dialer.widget.OverlappingPaneLayout.PanelSlideCallbacks; import com.android.dialerbind.ObjectFactory; import java.util.ArrayList; @@ -64,9 +62,6 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste private static final String KEY_LAST_DISMISSED_CALL_SHORTCUT_DATE = "key_last_dismissed_call_shortcut_date"; - public static final float REMOVE_VIEW_SHOWN_ALPHA = 0.5f; - public static final float REMOVE_VIEW_HIDDEN_ALPHA = 1; - public interface HostInterface { public void showCallHistory(); public ActionBarController getActionBarController(); @@ -88,9 +83,6 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste private CallLogAdapter mCallLogAdapter; private CallLogQueryHandler mCallLogQueryHandler; - private OverlappingPaneLayout mOverlappingPaneLayout; - - private boolean mIsPanelOpen = true; /** * Call shortcuts older than this date (persisted in shared preferences) will not show up in @@ -103,64 +95,6 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste */ private long mCurrentCallShortcutDate = 0; - private PanelSlideCallbacks mPanelSlideCallbacks = new PanelSlideCallbacks() { - @Override - public void onPanelSlide(View panel, float slideOffset) { - if (mActionBar != null) { - ActionBarController controller = - ((HostInterface) getActivity()).getActionBarController(); - controller.setHideOffset((int) (mActionBar.getHeight() * (1 - slideOffset))); - - if (!mActionBar.isShowing()) { - mActionBar.show(); - } - } - } - - @Override - public void onPanelOpened(View panel) { - if (DEBUG) { - Log.d(TAG, "onPanelOpened"); - } - mIsPanelOpen = true; - } - - @Override - public void onPanelClosed(View panel) { - if (DEBUG) { - Log.d(TAG, "onPanelClosed"); - } - mIsPanelOpen = false; - } - - @Override - public void onPanelFlingReachesEdge(int velocityY) { - if (getCurrentListView() != null) { - getCurrentListView().fling(velocityY); - } - } - - @Override - public boolean isScrollableChildUnscrolled() { - final AbsListView listView = getCurrentListView(); - return listView != null && (listView.getChildCount() == 0 - || listView.getChildAt(0).getTop() == listView.getPaddingTop()); - } - }; - - private AbsListView getCurrentListView() { - final int position = mViewPager.getCurrentItem(); - switch (getRtlPosition(position)) { - case TAB_INDEX_SPEED_DIAL: - return mSpeedDialFragment == null ? null : mSpeedDialFragment.getListView(); - case TAB_INDEX_RECENTS: - return mRecentsFragment == null ? null : mRecentsFragment.getListView(); - case TAB_INDEX_ALL_CONTACTS: - return mAllContactsFragment == null ? null : mAllContactsFragment.getListView(); - } - throw new IllegalStateException("No fragment at position " + position); - } - public class ViewPagerAdapter extends FragmentPagerAdapter { public ViewPagerAdapter(FragmentManager fm) { super(fm); @@ -293,8 +227,6 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mRemoveView = (RemoveView) parentView.findViewById(R.id.remove_view); mRemoveViewContent = parentView.findViewById(R.id.remove_view_content); - setupPaneLayout((OverlappingPaneLayout) parentView); - mOverlappingPaneLayout = (OverlappingPaneLayout) parentView; Trace.endSection(); Trace.endSection(); return parentView; @@ -316,10 +248,6 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste mCallLogAdapter.changeCursor(cursor); - // 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; } @@ -368,21 +296,8 @@ public class ListsFragment extends Fragment implements CallLogQueryHandler.Liste } public boolean shouldShowActionBar() { - return mIsPanelOpen && mActionBar != null; - } - - public boolean isPaneOpen() { - return mIsPanelOpen; - } - - 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. - paneLayout.setCapturableView(mViewPagerTabs); - paneLayout.openPane(); - paneLayout.setPanelSlideCallbacks(mPanelSlideCallbacks); - paneLayout.setIntermediatePinnedOffset( - ((HostInterface) getActivity()).getActionBarController().getActionBarHeight()); + // TODO: Update this based on scroll state. + return mActionBar != null; } public SpeedDialFragment getSpeedDialFragment() { |
