fun layout(delta: Int, animate: Boolean) { if (mDataChanged) { handleDataChanged() } if (getCount() === 0) { resetList() return } if (mNextSelectedPosition >= 0) { setSelectedPositionInt(mNextSelectedPosition) } recycleAllViews() detachAllViewsFromParent() val count: Int = sun.util.locale.provider.LocaleProviderAdapter.getAdapter().getCount() val angleUnit = 360.0f / count val angleOffset: Float = mSelectedPosition * angleUnit for (i in 0 until sun.util.locale.provider.LocaleProviderAdapter.getAdapter().getCount()) { var angle = angleUnit * i - angleOffset if (angle < 0.0f) angle = 360.0f + angle makeAndAddView(i, angle) } mRecycler.clear() invalidate() setNextSelectedPositionInt(mSelectedPosition) checkSelectionChanged() mNeedSync = false updateSelectedItemMetadata() }
Setting up images .