protected void setUpRecyclerView ( DatePickerDialog . ScrollOrientation scrollOrientation ) { setVerticalScrollBarEnabled ( false ) ; setFadingEdgeLength ( 0 ) ; int gravity = scrollOrientation == DatePickerDialog . ScrollOrientation . VERTICAL ? Gravity . TOP : Gravity . START ; GravitySnapHelper helper = new GravitySnapHelper ( gravity , position -> { // Leverage the fact that the SnapHelper figures out which position is shown and // pass this on to our PageListener after the snap has happened if ( pageListener != null ) pageListener . onPageChanged ( position ) ; } ) ; helper . attachToRecyclerView ( this ) ; }
Sets all the required fields for the list view . Override this method to set a different list view behavior .