public void initializeView() { super.initializeView(R.layout.lazy_dragger_panel); lazyDraggerView = (LazyDraggerView) findViewById(R.id.dragger_view); if (attributes != null) { setLazyDraggerLimit(draggerLimit); setLazyDraggerPosition(DraggerPosition.getDragPosition(draggerPosition)); } config(); }
public void initializeView() { super.initializeView(R.layout.dragger_panel); draggerView = (DraggerView) findViewById(R.id.dragger_view); if (attributes != null) { setDraggerLimit(draggerLimit); setDraggerPosition(DraggerPosition.getDragPosition(draggerPosition)); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); draggerView.setAnimationDuration(900, 500); configRecyclerView(); }
private void configViews(int layoutResID) { draggerPanel.addViewOnDrag(inflateLayout(layoutResID)); if (shadowResID == -1) { shadowResID = R.layout.layout_shadow; } draggerPanel.addViewOnShadow(inflateLayout(shadowResID)); }
@Override public void onCreate(Bundle savedInstanceState) { overridePendingTransition(0, 0); super.onCreate(savedInstanceState); setContentView(R.layout.layout_content); }
@Override public void setContentView(int layoutResID) { configDraggerView(); configViews(layoutResID); super.setContentView(draggerPanel); }
private void configViews(int layoutResID) { lazyDraggerPanel.addViewOnDrag(inflateLayout(layoutResID)); if (shadowResID == -1) { shadowResID = R.layout.layout_shadow; } lazyDraggerPanel.addViewOnShadow(inflateLayout(shadowResID)); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setToolbarTitle(); setDisableBackButton(true); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); configToolbar(); configIntents(); }
@Override public void setContentView(int layoutResID) { configDraggerView(); configViews(layoutResID); super.setContentView(lazyDraggerPanel); }
/** * Apply all the custom view configuration and inflate the main view. The view won't be * visible if this method is not called. */ public void initializeView(int layoutId) { inflate(getContext(), layoutId, this); dragView = (FrameLayout) findViewById(R.id.drag_view); shadowView = (FrameLayout) findViewById(R.id.shadow_view); }
/** * Configure the DragViewHelper instance adding a * instance of DraggerHelperCallback, useful to * detect the touch callbacks from dragView. */ private void configDragViewHelper() { dragHelper = ViewDragHelper.create(this, SENSITIVITY, new DraggerHelperCallback(this, dragView, draggerListener)); }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); configLayoutInflater(); }
@Override public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { draggerView.setSlideEnabled(scrollY == 0); } @Override public void onDownMotionEvent() { }
private void saveInitialMotion(float x, float y, int pointerId) { ensureMotionHistorySizeForId(pointerId); mInitialMotionX[pointerId] = mLastMotionX[pointerId] = x; mInitialMotionY[pointerId] = mLastMotionY[pointerId] = y; mInitialEdgesTouched[pointerId] = getEdgesTouched((int) x, (int) y); mPointersDown |= 1 << pointerId; }
public void preparePosition() { post(new Runnable() { @Override public void run() { getSpring().setCurrentValue(1).setAtRest(); if (runAnimationOnFinishInflate) { show(); } } }); }
@Override public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) { setSlideEnabled(scrollY == 0); } @Override public void onDownMotionEvent() { }
private void notifyOpen() { if (draggerCallback != null) { draggerCallback.notifyOpen(); } }
/** * Return the max value of view that can * slide based on #camplViewPositionHorizontal * * @param child return the view on focus * @return max horizontal distance that view on focus can slide */ @Override public int getViewHorizontalDragRange(View child) { return (int) draggerListener.dragHorizontalDragRange(); }
/** * Return the max value of view that can * slide based on #clampViewPositionVertical * * @param child return the view on focus * @return max vertical distance that view on focus can slide */ @Override public int getViewVerticalDragRange(View child) { return (int) draggerListener.dragVerticalDragRange(); }