private View inflateDividerView ( @ Nullable final ViewGroup parent , @ NonNull final Divider divider , final int position ) { LayoutInflater layoutInflater = LayoutInflater . from ( context ) ; View view = layoutInflater . inflate ( R . layout . divider , parent , false ) ; DividerViewHolder viewHolder = new DividerViewHolder ( ) ; viewHolder . leftDivider = view . findViewById ( R . id . left_divider ) ; viewHolder . rightDivider = view . findViewById ( R . id . right_divider ) ; viewHolder . titleTextView = view . findViewById ( android . R . id . title ) ; view . setTag ( viewHolder ) ; if ( ! TextUtils . isEmpty ( divider . getTitle ( ) ) || ( position % columnCount > 0 && ! TextUtils . isEmpty ( getRawItems ( ) . get ( position - ( position % columnCount ) ) . getTitle ( ) ) ) ) { view . getLayoutParams ( ) . height = context . getResources ( ) . getDimensionPixelSize ( R . dimen . bottom_sheet_divider_title_height ) ; } return view ; }
Inflates the view which is used to visualize a divider .