question: private void updatePanelForExpansion ( float percentage ) { updatePromoVisibility ( 1.f ) ; float baseBaseY = MathUtils . interpolate ( 0.f , getBasePageTargetY ( ) , percentage ) ; mBasePageY = baseBaseY ; float brightness = MathUtils . interpolate ( BASE_PAGE_BRIGHTNESS_STATE_PEEKED , BASE_PAGE_BRIGHTNESS_STATE_EXPANDED , percentage ) ; mBasePageBrightness = brightness ; float searchBarHeight = Math . round ( MathUtils . interpolate ( mSearchBarHeightPeeking , getSearchBarHeightExpanded ( ) , percentage ) ) ; mSearchBarHeight = searchBarHeight ; mSearchBarTextOpacity = 1.f ; mIsSearchBarBorderVisible = true ; mSearchBarBorderY = searchBarHeight - SEARCH_BAR_BORDER_HEIGHT_DP + 1 ; mSearchIconOpacity = SEARCH_ICON_OPACITY_STATE_EXPANDED ; mArrowIconOpacity = ARROW_ICON_OPACITY_STATE_EXPANDED ; mArrowIconRotation = Math . round ( MathUtils . interpolate ( ARROW_ICON_ROTATION_STATE_PEEKED , ARROW_ICON_ROTATION_STATE_EXPANDED , percentage ) ) ; mCloseIconOpacity = CLOSE_ICON_OPACITY_STATE_EXPANDED ; float peekedHeight = getPanelHeightFromState ( PanelState . PEEKED ) ; float threshold = PROGRESS_BAR_VISIBILITY_THRESHOLD_DP / mPxToDp ; float diff = Math . min ( mHeight - peekedHeight , threshold ) ; float progressBarOpacity = MathUtils . interpolate ( 0.f , 1.f , diff / threshold ) ; mProgressBarOpacity = progressBarOpacity ; mProgressBarY = searchBarHeight - PROGRESS_BAR_HEIGHT_DP + 1 ; updateSearchBarShadow ( ) ; }
target:  Updates the UI state for the peeked to expanded transition (and vice versa), according to a completion |percentage|.