FileDocCategorySizeDatePackage
RadialTextsView.javaAPI DocAndroid 5.1 API14935Thu Mar 12 22:22:50 GMT 2015com.android.datetimepicker.time

RadialTextsView

public class RadialTextsView extends android.view.View
A view to show a series of numbers in a circular pattern.

Fields Summary
private static final String
TAG
private final android.graphics.Paint
mPaint
private boolean
mDrawValuesReady
private boolean
mIsInitialized
private android.graphics.Typeface
mTypefaceLight
private android.graphics.Typeface
mTypefaceRegular
private String[]
mTexts
private String[]
mInnerTexts
private boolean
mIs24HourMode
private boolean
mHasInnerCircle
private float
mCircleRadiusMultiplier
private float
mAmPmCircleRadiusMultiplier
private float
mNumbersRadiusMultiplier
private float
mInnerNumbersRadiusMultiplier
private float
mTextSizeMultiplier
private float
mInnerTextSizeMultiplier
private int
mXCenter
private int
mYCenter
private float
mCircleRadius
private boolean
mTextGridValuesDirty
private float
mTextSize
private float
mInnerTextSize
private float[]
mTextGridHeights
private float[]
mTextGridWidths
private float[]
mInnerTextGridHeights
private float[]
mInnerTextGridWidths
private float
mAnimationRadiusMultiplier
private float
mTransitionMidRadiusMultiplier
private float
mTransitionEndRadiusMultiplier
android.animation.ObjectAnimator
mDisappearAnimator
android.animation.ObjectAnimator
mReappearAnimator
private InvalidateUpdateListener
mInvalidateUpdateListener
Constructors Summary
public RadialTextsView(android.content.Context context)


       
        super(context);
        mIsInitialized = false;
    
Methods Summary
private voidcalculateGridSizes(float numbersRadius, float xCenter, float yCenter, float textSize, float[] textGridHeights, float[] textGridWidths)
Using the trigonometric Unit Circle, calculate the positions that the text will need to be drawn at based on the specified circle radius. Place the values in the textGridHeights and textGridWidths parameters.

        /*
         * The numbers need to be drawn in a 7x7 grid, representing the points on the Unit Circle.
         */
        float offset1 = numbersRadius;
        // cos(30) = a / r => r * cos(30) = a => r * â