/** * Add a custom view to shadowView, optional. * * @param view Instance of the view. */ public void addViewOnShadow(View view) { eraseViewIfNeeded(shadowView); shadowView.addView(view); }
/** * 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); }
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)); } }
/** * Map the attributes to use with DraggerView * * @param attrs Attributes to be mapped. */ public void initializeAttributes(AttributeSet attrs) { attributes = getContext().obtainStyledAttributes(attrs, R.styleable.dragger_layout); if (attributes != null) { draggerLimit = attributes.getFloat(R.styleable.dragger_layout_drag_limit, DEFAULT_DRAG_LIMIT); draggerPosition = attributes.getInt(R.styleable.dragger_layout_drag_position, DEFAULT_DRAG_POSITION); } }
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(); }
/** * Add a custom view to dragView. * * @param view Instance of view. */ public void addViewOnDrag(View view) { eraseViewIfNeeded(dragView); dragView.addView(view); }