/** * 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); }