WheelView.smali
.class public Lcom/contrarywind/view/WheelView;
.super Landroid/view/View;
.source "WheelView.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/contrarywind/view/WheelView$DividerType;,
Lcom/contrarywind/view/WheelView$ACTION;
}
.end annotation
# static fields
.field private static final SCALE_CONTENT:F = 0.8f
.field private static final TIME_NUM:[Ljava/lang/String;
.field private static final VELOCITY_FLING:I = 0x5
# instance fields
.field private CENTER_CONTENT_OFFSET:F
.field private adapter:Lcom/contrarywind/adapter/WheelAdapter;
.field private centerY:F
.field private context:Landroid/content/Context;
.field private dividerColor:I
.field private dividerType:Lcom/contrarywind/view/WheelView$DividerType;
.field private dividerWidth:I
.field private drawCenterContentStart:I
.field private drawOutContentStart:I
.field private firstLineY:F
.field private gestureDetector:Landroid/view/GestureDetector;
.field private handler:Landroid/os/Handler;
.field private initPosition:I
.field private isAlphaGradient:Z
.field private isCenterLabel:Z
.field private isLoop:Z
.field private isOptions:Z
.field private itemHeight:F
.field private itemsVisible:I
.field private label:Ljava/lang/String;
.field private lineSpacingMultiplier:F
.field private mExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.field private mFuture:Ljava/util/concurrent/ScheduledFuture;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/concurrent/ScheduledFuture<",
"*>;"
}
.end annotation
.end field
.field private mGravity:I
.field private mOffset:I
.field private maxTextHeight:I
.field private maxTextWidth:I
.field private measuredHeight:I
.field private measuredWidth:I
.field private onItemSelectedListener:Lcom/contrarywind/listener/OnItemSelectedListener;
.field private paintCenterText:Landroid/graphics/Paint;
.field private paintIndicator:Landroid/graphics/Paint;
.field private paintOuterText:Landroid/graphics/Paint;
.field private preCurrentIndex:I
.field private previousY:F
.field private radius:I
.field private secondLineY:F
.field private selectedItem:I
.field private startTime:J
.field private textColorCenter:I
.field private textColorOut:I
.field private textSize:I
.field private textXOffset:I
.field private totalScrollY:F
.field private typeface:Landroid/graphics/Typeface;
.field private widthMeasureSpec:I
# direct methods
.method static constructor <clinit>()V
.registers 10
.line 45
const-string v0, "00"
const-string v1, "01"
const-string v2, "02"
const-string v3, "03"
const-string v4, "04"
const-string v5, "05"
const-string v6, "06"
const-string v7, "07"
const-string v8, "08"
const-string v9, "09"
filled-new-array/range {v0 .. v9}, [Ljava/lang/String;
move-result-object v0
sput-object v0, Lcom/contrarywind/view/WheelView;->TIME_NUM:[Ljava/lang/String;
return-void
.end method
.method public constructor <init>(Landroid/content/Context;)V
.registers 3
.param p1, "context" # Landroid/content/Context;
.line 128
const/4 v0, 0x0
invoke-direct {p0, p1, v0}, Lcom/contrarywind/view/WheelView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 129
return-void
.end method
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.registers 9
.param p1, "context" # Landroid/content/Context;
.param p2, "attrs" # Landroid/util/AttributeSet;
.line 132
invoke-direct {p0, p1, p2}, Landroid/view/View;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
.line 54
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/contrarywind/view/WheelView;->isOptions:Z
.line 55
const/4 v1, 0x1
iput-boolean v1, p0, Lcom/contrarywind/view/WheelView;->isCenterLabel:Z
.line 58
invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadScheduledExecutor()Ljava/util/concurrent/ScheduledExecutorService;
move-result-object v1
iput-object v1, p0, Lcom/contrarywind/view/WheelView;->mExecutor:Ljava/util/concurrent/ScheduledExecutorService;
.line 75
sget-object v1, Landroid/graphics/Typeface;->MONOSPACE:Landroid/graphics/Typeface;
iput-object v1, p0, Lcom/contrarywind/view/WheelView;->typeface:Landroid/graphics/Typeface;
.line 82
const v1, 0x3fcccccd # 1.6f
iput v1, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
.line 103
const/16 v1, 0xb
iput v1, p0, Lcom/contrarywind/view/WheelView;->itemsVisible:I
.line 111
iput v0, p0, Lcom/contrarywind/view/WheelView;->mOffset:I
.line 112
const/4 v1, 0x0
iput v1, p0, Lcom/contrarywind/view/WheelView;->previousY:F
.line 113
const-wide/16 v1, 0x0
iput-wide v1, p0, Lcom/contrarywind/view/WheelView;->startTime:J
.line 119
const/16 v1, 0x11
iput v1, p0, Lcom/contrarywind/view/WheelView;->mGravity:I
.line 120
iput v0, p0, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
.line 121
iput v0, p0, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
.line 125
iput-boolean v0, p0, Lcom/contrarywind/view/WheelView;->isAlphaGradient:Z
.line 134
invoke-virtual {p0}, Lcom/contrarywind/view/WheelView;->getResources()Landroid/content/res/Resources;
move-result-object v2
sget v3, Lcom/contrarywind/view/R$dimen;->pickerview_textsize:I
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
move-result v2
iput v2, p0, Lcom/contrarywind/view/WheelView;->textSize:I
.line 136
invoke-virtual {p0}, Lcom/contrarywind/view/WheelView;->getResources()Landroid/content/res/Resources;
move-result-object v2
invoke-virtual {v2}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v2
.line 137
.local v2, "dm":Landroid/util/DisplayMetrics;
iget v3, v2, Landroid/util/DisplayMetrics;->density:F
.line 139
.local v3, "density":F
const/high16 v4, 0x3f800000 # 1.0f
cmpg-float v5, v3, v4
if-gez v5, :cond_51
.line 140
const v4, 0x4019999a # 2.4f
iput v4, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
goto :goto_79
.line 141
:cond_51
const/high16 v5, 0x40000000 # 2.0f
cmpg-float v4, v4, v3
if-gtz v4, :cond_60
cmpg-float v4, v3, v5
if-gez v4, :cond_60
.line 142
const/high16 v4, 0x40800000 # 4.0f
iput v4, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
goto :goto_79
.line 143
:cond_60
const/high16 v4, 0x40400000 # 3.0f
cmpg-float v5, v5, v3
if-gtz v5, :cond_6f
cmpg-float v5, v3, v4
if-gez v5, :cond_6f
.line 144
const/high16 v4, 0x40c00000 # 6.0f
iput v4, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
goto :goto_79
.line 145
:cond_6f
cmpl-float v4, v3, v4
if-ltz v4, :cond_79
.line 146
const/high16 v4, 0x40200000 # 2.5f
mul-float v4, v4, v3
iput v4, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
.line 149
:cond_79
:goto_79
if-eqz p2, :cond_ca
.line 150
sget-object v4, Lcom/contrarywind/view/R$styleable;->pickerview:[I
invoke-virtual {p1, p2, v4, v0, v0}, Landroid/content/Context;->obtainStyledAttributes(Landroid/util/AttributeSet;[III)Landroid/content/res/TypedArray;
move-result-object v0
.line 151
.local v0, "a":Landroid/content/res/TypedArray;
sget v4, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_gravity:I
invoke-virtual {v0, v4, v1}, Landroid/content/res/TypedArray;->getInt(II)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->mGravity:I
.line 152
sget v1, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_textColorOut:I
const v4, -0x575758
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getColor(II)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->textColorOut:I
.line 153
sget v1, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_textColorCenter:I
const v4, -0xd5d5d6
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getColor(II)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->textColorCenter:I
.line 154
sget v1, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_dividerColor:I
const v4, -0x2a2a2b
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getColor(II)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->dividerColor:I
.line 155
sget v1, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_dividerWidth:I
const/4 v4, 0x2
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getDimensionPixelSize(II)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->dividerWidth:I
.line 156
sget v1, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_textSize:I
iget v4, p0, Lcom/contrarywind/view/WheelView;->textSize:I
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getDimensionPixelOffset(II)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->textSize:I
.line 157
sget v1, Lcom/contrarywind/view/R$styleable;->pickerview_wheelview_lineSpacingMultiplier:I
iget v4, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
invoke-virtual {v0, v1, v4}, Landroid/content/res/TypedArray;->getFloat(IF)F
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
.line 158
invoke-virtual {v0}, Landroid/content/res/TypedArray;->recycle()V
.line 161
.end local v0 # "a":Landroid/content/res/TypedArray;
:cond_ca
invoke-direct {p0}, Lcom/contrarywind/view/WheelView;->judgeLineSpace()V
.line 162
invoke-direct {p0, p1}, Lcom/contrarywind/view/WheelView;->initLoopView(Landroid/content/Context;)V
.line 163
return-void
.end method
.method static synthetic access$000(Lcom/contrarywind/view/WheelView;)Lcom/contrarywind/listener/OnItemSelectedListener;
.registers 2
.param p0, "x0" # Lcom/contrarywind/view/WheelView;
.line 35
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->onItemSelectedListener:Lcom/contrarywind/listener/OnItemSelectedListener;
return-object v0
.end method
.method private getContentText(Ljava/lang/Object;)Ljava/lang/String;
.registers 3
.param p1, "item" # Ljava/lang/Object;
.line 608
if-nez p1, :cond_5
.line 609
const-string v0, ""
return-object v0
.line 610
:cond_5
instance-of v0, p1, Lcom/contrarywind/interfaces/IPickerViewData;
if-eqz v0, :cond_11
.line 611
move-object v0, p1
check-cast v0, Lcom/contrarywind/interfaces/IPickerViewData;
invoke-interface {v0}, Lcom/contrarywind/interfaces/IPickerViewData;->getPickerViewText()Ljava/lang/String;
move-result-object v0
return-object v0
.line 612
:cond_11
instance-of v0, p1, Ljava/lang/Integer;
if-eqz v0, :cond_21
.line 614
move-object v0, p1
check-cast v0, Ljava/lang/Integer;
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
move-result v0
invoke-direct {p0, v0}, Lcom/contrarywind/view/WheelView;->getFixNum(I)Ljava/lang/String;
move-result-object v0
return-object v0
.line 616
:cond_21
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method
.method private getFixNum(I)Ljava/lang/String;
.registers 3
.param p1, "timeNum" # I
.line 620
if-ltz p1, :cond_b
const/16 v0, 0xa
if-ge p1, v0, :cond_b
sget-object v0, Lcom/contrarywind/view/WheelView;->TIME_NUM:[Ljava/lang/String;
aget-object v0, v0, p1
goto :goto_f
:cond_b
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object v0
:goto_f
return-object v0
.end method
.method private getLoopMappingIndex(I)I
.registers 3
.param p1, "index" # I
.line 591
if-gez p1, :cond_e
.line 592
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
add-int/2addr p1, v0
.line 593
invoke-direct {p0, p1}, Lcom/contrarywind/view/WheelView;->getLoopMappingIndex(I)I
move-result p1
goto :goto_23
.line 594
:cond_e
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
add-int/lit8 v0, v0, -0x1
if-le p1, v0, :cond_23
.line 595
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
sub-int/2addr p1, v0
.line 596
invoke-direct {p0, p1}, Lcom/contrarywind/view/WheelView;->getLoopMappingIndex(I)I
move-result p1
.line 598
:cond_23
:goto_23
return p1
.end method
.method private initLoopView(Landroid/content/Context;)V
.registers 4
.param p1, "context" # Landroid/content/Context;
.line 177
iput-object p1, p0, Lcom/contrarywind/view/WheelView;->context:Landroid/content/Context;
.line 178
new-instance v0, Lcom/contrarywind/timer/MessageHandler;
invoke-direct {v0, p0}, Lcom/contrarywind/timer/MessageHandler;-><init>(Lcom/contrarywind/view/WheelView;)V
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->handler:Landroid/os/Handler;
.line 179
new-instance v0, Landroid/view/GestureDetector;
new-instance v1, Lcom/contrarywind/listener/LoopViewGestureListener;
invoke-direct {v1, p0}, Lcom/contrarywind/listener/LoopViewGestureListener;-><init>(Lcom/contrarywind/view/WheelView;)V
invoke-direct {v0, p1, v1}, Landroid/view/GestureDetector;-><init>(Landroid/content/Context;Landroid/view/GestureDetector$OnGestureListener;)V
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->gestureDetector:Landroid/view/GestureDetector;
.line 180
const/4 v1, 0x0
invoke-virtual {v0, v1}, Landroid/view/GestureDetector;->setIsLongpressEnabled(Z)V
.line 181
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/contrarywind/view/WheelView;->isLoop:Z
.line 183
const/4 v0, 0x0
iput v0, p0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
.line 184
const/4 v0, -0x1
iput v0, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
.line 185
invoke-direct {p0}, Lcom/contrarywind/view/WheelView;->initPaints()V
.line 186
return-void
.end method
.method private initPaints()V
.registers 4
.line 189
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
.line 190
iget v1, p0, Lcom/contrarywind/view/WheelView;->textColorOut:I
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
.line 191
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
const/4 v1, 0x1
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 192
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->typeface:Landroid/graphics/Typeface;
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
.line 193
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
iget v2, p0, Lcom/contrarywind/view/WheelView;->textSize:I
int-to-float v2, v2
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTextSize(F)V
.line 195
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
.line 196
iget v2, p0, Lcom/contrarywind/view/WheelView;->textColorCenter:I
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 197
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 198
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
const v2, 0x3f8ccccd # 1.1f
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTextScaleX(F)V
.line 199
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->typeface:Landroid/graphics/Typeface;
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
.line 200
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
iget v2, p0, Lcom/contrarywind/view/WheelView;->textSize:I
int-to-float v2, v2
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setTextSize(F)V
.line 202
new-instance v0, Landroid/graphics/Paint;
invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
.line 203
iget v2, p0, Lcom/contrarywind/view/WheelView;->dividerColor:I
invoke-virtual {v0, v2}, Landroid/graphics/Paint;->setColor(I)V
.line 204
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setAntiAlias(Z)V
.line 206
const/4 v0, 0x0
invoke-virtual {p0, v1, v0}, Lcom/contrarywind/view/WheelView;->setLayerType(ILandroid/graphics/Paint;)V
.line 207
return-void
.end method
.method private judgeLineSpace()V
.registers 4
.line 169
iget v0, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
const/high16 v1, 0x3f800000 # 1.0f
cmpg-float v2, v0, v1
if-gez v2, :cond_b
.line 170
iput v1, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
goto :goto_13
.line 171
:cond_b
const/high16 v1, 0x40800000 # 4.0f
cmpl-float v0, v0, v1
if-lez v0, :cond_13
.line 172
iput v1, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
.line 174
:cond_13
:goto_13
return-void
.end method
.method private measureTextWidthHeight()V
.registers 7
.line 244
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
.line 245
.local v0, "rect":Landroid/graphics/Rect;
const/4 v1, 0x0
.local v1, "i":I
:goto_6
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
const/4 v3, 0x0
if-ge v1, v2, :cond_2f
.line 246
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2, v1}, Lcom/contrarywind/adapter/WheelAdapter;->getItem(I)Ljava/lang/Object;
move-result-object v2
invoke-direct {p0, v2}, Lcom/contrarywind/view/WheelView;->getContentText(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v2
.line 247
.local v2, "s1":Ljava/lang/String;
iget-object v4, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v5
invoke-virtual {v4, v2, v3, v5, v0}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
.line 249
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v3
.line 250
.local v3, "textWidth":I
iget v4, p0, Lcom/contrarywind/view/WheelView;->maxTextWidth:I
if-le v3, v4, :cond_2c
.line 251
iput v3, p0, Lcom/contrarywind/view/WheelView;->maxTextWidth:I
.line 245
.end local v2 # "s1":Ljava/lang/String;
.end local v3 # "textWidth":I
:cond_2c
add-int/lit8 v1, v1, 0x1
goto :goto_6
.line 254
.end local v1 # "i":I
:cond_2f
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
const/4 v2, 0x2
const-string/jumbo v4, "\u661f\u671f"
invoke-virtual {v1, v4, v3, v2, v0}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
.line 255
invoke-virtual {v0}, Landroid/graphics/Rect;->height()I
move-result v1
add-int/2addr v1, v2
iput v1, p0, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
.line 256
iget v2, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
int-to-float v1, v1
mul-float v2, v2, v1
iput v2, p0, Lcom/contrarywind/view/WheelView;->itemHeight:F
.line 257
return-void
.end method
.method private measuredCenterContentStart(Ljava/lang/String;)V
.registers 7
.param p1, "content" # Ljava/lang/String;
.line 624
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
.line 625
.local v0, "rect":Landroid/graphics/Rect;
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
const/4 v3, 0x0
invoke-virtual {v1, p1, v3, v2, v0}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
.line 626
iget v1, p0, Lcom/contrarywind/view/WheelView;->mGravity:I
const/4 v2, 0x3
if-eq v1, v2, :cond_65
const/4 v2, 0x5
if-eq v1, v2, :cond_57
const/16 v2, 0x11
if-eq v1, v2, :cond_1c
goto :goto_68
.line 628
:cond_1c
iget-boolean v1, p0, Lcom/contrarywind/view/WheelView;->isOptions:Z
if-nez v1, :cond_44
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
if-eqz v1, :cond_44
const-string v2, ""
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_44
iget-boolean v1, p0, Lcom/contrarywind/view/WheelView;->isCenterLabel:Z
if-nez v1, :cond_31
goto :goto_44
.line 631
:cond_31
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v2
sub-int/2addr v1, v2
int-to-double v1, v1
const-wide/high16 v3, 0x3fd0000000000000L # 0.25
invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z
mul-double v1, v1, v3
double-to-int v1, v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
.line 633
goto :goto_68
.line 629
:cond_44
:goto_44
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v2
sub-int/2addr v1, v2
int-to-double v1, v1
const-wide/high16 v3, 0x3fe0000000000000L # 0.5
invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z
mul-double v1, v1, v3
double-to-int v1, v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
goto :goto_68
.line 638
:cond_57
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v2
sub-int/2addr v1, v2
iget v2, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
float-to-int v2, v2
sub-int/2addr v1, v2
iput v1, p0, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
goto :goto_68
.line 635
:cond_65
iput v3, p0, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
.line 636
nop
.line 641
:goto_68
return-void
.end method
.method private measuredOutContentStart(Ljava/lang/String;)V
.registers 7
.param p1, "content" # Ljava/lang/String;
.line 644
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
.line 645
.local v0, "rect":Landroid/graphics/Rect;
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
const/4 v3, 0x0
invoke-virtual {v1, p1, v3, v2, v0}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
.line 646
iget v1, p0, Lcom/contrarywind/view/WheelView;->mGravity:I
const/4 v2, 0x3
if-eq v1, v2, :cond_65
const/4 v2, 0x5
if-eq v1, v2, :cond_57
const/16 v2, 0x11
if-eq v1, v2, :cond_1c
goto :goto_68
.line 648
:cond_1c
iget-boolean v1, p0, Lcom/contrarywind/view/WheelView;->isOptions:Z
if-nez v1, :cond_44
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
if-eqz v1, :cond_44
const-string v2, ""
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_44
iget-boolean v1, p0, Lcom/contrarywind/view/WheelView;->isCenterLabel:Z
if-nez v1, :cond_31
goto :goto_44
.line 651
:cond_31
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v2
sub-int/2addr v1, v2
int-to-double v1, v1
const-wide/high16 v3, 0x3fd0000000000000L # 0.25
invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z
mul-double v1, v1, v3
double-to-int v1, v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
.line 653
goto :goto_68
.line 649
:cond_44
:goto_44
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v2
sub-int/2addr v1, v2
int-to-double v1, v1
const-wide/high16 v3, 0x3fe0000000000000L # 0.5
invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z
mul-double v1, v1, v3
double-to-int v1, v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
goto :goto_68
.line 658
:cond_57
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v2
sub-int/2addr v1, v2
iget v2, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
float-to-int v2, v2
sub-int/2addr v1, v2
iput v1, p0, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
goto :goto_68
.line 655
:cond_65
iput v3, p0, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
.line 656
nop
.line 661
:goto_68
return-void
.end method
.method private reMeasure()V
.registers 6
.line 210
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
if-nez v0, :cond_5
.line 211
return-void
.line 214
:cond_5
invoke-direct {p0}, Lcom/contrarywind/view/WheelView;->measureTextWidthHeight()V
.line 217
iget v0, p0, Lcom/contrarywind/view/WheelView;->itemHeight:F
iget v1, p0, Lcom/contrarywind/view/WheelView;->itemsVisible:I
add-int/lit8 v1, v1, -0x1
int-to-float v1, v1
mul-float v0, v0, v1
float-to-int v0, v0
.line 219
.local v0, "halfCircumference":I
mul-int/lit8 v1, v0, 0x2
int-to-double v1, v1
const-wide v3, 0x400921fb54442d18L # Math.PI
invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z
div-double/2addr v1, v3
double-to-int v1, v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->measuredHeight:I
.line 221
int-to-double v1, v0
invoke-static {v1, v2}, Ljava/lang/Double;->isNaN(D)Z
div-double/2addr v1, v3
double-to-int v1, v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->radius:I
.line 223
iget v1, p0, Lcom/contrarywind/view/WheelView;->widthMeasureSpec:I
invoke-static {v1}, Landroid/view/View$MeasureSpec;->getSize(I)I
move-result v1
iput v1, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
.line 225
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredHeight:I
int-to-float v2, v1
iget v3, p0, Lcom/contrarywind/view/WheelView;->itemHeight:F
sub-float/2addr v2, v3
const/high16 v4, 0x40000000 # 2.0f
div-float/2addr v2, v4
iput v2, p0, Lcom/contrarywind/view/WheelView;->firstLineY:F
.line 226
int-to-float v1, v1
add-float/2addr v1, v3
div-float/2addr v1, v4
iput v1, p0, Lcom/contrarywind/view/WheelView;->secondLineY:F
.line 227
iget v2, p0, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v2, v2
sub-float/2addr v3, v2
div-float/2addr v3, v4
sub-float/2addr v1, v3
iget v2, p0, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
sub-float/2addr v1, v2
iput v1, p0, Lcom/contrarywind/view/WheelView;->centerY:F
.line 230
iget v1, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
const/4 v2, -0x1
if-ne v1, v2, :cond_65
.line 231
iget-boolean v1, p0, Lcom/contrarywind/view/WheelView;->isLoop:Z
if-eqz v1, :cond_62
.line 232
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v1}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v1
add-int/lit8 v1, v1, 0x1
div-int/lit8 v1, v1, 0x2
iput v1, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
goto :goto_65
.line 234
:cond_62
const/4 v1, 0x0
iput v1, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
.line 237
:cond_65
:goto_65
iget v1, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
iput v1, p0, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
.line 238
return-void
.end method
.method private reMeasureTextSize(Ljava/lang/String;)V
.registers 8
.param p1, "contentText" # Ljava/lang/String;
.line 573
new-instance v0, Landroid/graphics/Rect;
invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
.line 574
.local v0, "rect":Landroid/graphics/Rect;
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v2
const/4 v3, 0x0
invoke-virtual {v1, p1, v3, v2, v0}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
.line 575
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v1
.line 576
.local v1, "width":I
iget v2, p0, Lcom/contrarywind/view/WheelView;->textSize:I
.line 577
.local v2, "size":I
:goto_15
iget v4, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
if-le v1, v4, :cond_2f
.line 578
add-int/lit8 v2, v2, -0x1
.line 580
iget-object v4, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
int-to-float v5, v2
invoke-virtual {v4, v5}, Landroid/graphics/Paint;->setTextSize(F)V
.line 581
iget-object v4, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v5
invoke-virtual {v4, p1, v3, v5, v0}, Landroid/graphics/Paint;->getTextBounds(Ljava/lang/String;IILandroid/graphics/Rect;)V
.line 582
invoke-virtual {v0}, Landroid/graphics/Rect;->width()I
move-result v1
goto :goto_15
.line 585
:cond_2f
iget-object v3, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
int-to-float v4, v2
invoke-virtual {v3, v4}, Landroid/graphics/Paint;->setTextSize(F)V
.line 586
return-void
.end method
.method private setOutPaintStyle(FF)V
.registers 7
.param p1, "offsetCoefficient" # F
.param p2, "angle" # F
.line 552
const/high16 v0, 0x3f000000 # 0.5f
.line 553
.local v0, "DEFAULT_TEXT_TARGET_SKEW_X":F
const/4 v1, 0x0
.line 554
.local v1, "multiplier":I
iget v2, p0, Lcom/contrarywind/view/WheelView;->textXOffset:I
if-lez v2, :cond_9
.line 555
const/4 v1, 0x1
goto :goto_c
.line 556
:cond_9
if-gez v2, :cond_c
.line 557
const/4 v1, -0x1
.line 559
:cond_c
:goto_c
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
const/4 v3, 0x0
cmpl-float v3, p2, v3
if-lez v3, :cond_15
const/4 v3, -0x1
goto :goto_16
:cond_15
const/4 v3, 0x1
:goto_16
mul-int v3, v3, v1
int-to-float v3, v3
mul-float v3, v3, v0
mul-float v3, v3, p1
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setTextSkewX(F)V
.line 562
iget-boolean v2, p0, Lcom/contrarywind/view/WheelView;->isAlphaGradient:Z
if-eqz v2, :cond_33
invoke-static {p2}, Ljava/lang/Math;->abs(F)F
move-result v2
const/high16 v3, 0x42b40000 # 90.0f
sub-float v2, v3, v2
div-float/2addr v2, v3
const/high16 v3, 0x437f0000 # 255.0f
mul-float v2, v2, v3
float-to-int v2, v2
goto :goto_35
:cond_33
const/16 v2, 0xff
.line 564
.local v2, "alpha":I
:goto_35
iget-object v3, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
invoke-virtual {v3, v2}, Landroid/graphics/Paint;->setAlpha(I)V
.line 565
return-void
.end method
# virtual methods
.method public cancelFuture()V
.registers 3
.line 279
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->mFuture:Ljava/util/concurrent/ScheduledFuture;
if-eqz v0, :cond_13
invoke-interface {v0}, Ljava/util/concurrent/ScheduledFuture;->isCancelled()Z
move-result v0
if-nez v0, :cond_13
.line 280
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->mFuture:Ljava/util/concurrent/ScheduledFuture;
const/4 v1, 0x1
invoke-interface {v0, v1}, Ljava/util/concurrent/ScheduledFuture;->cancel(Z)Z
.line 281
const/4 v0, 0x0
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->mFuture:Ljava/util/concurrent/ScheduledFuture;
.line 283
:cond_13
return-void
.end method
.method public final getAdapter()Lcom/contrarywind/adapter/WheelAdapter;
.registers 2
.line 338
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
return-object v0
.end method
.method public final getCurrentItem()I
.registers 4
.line 343
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
const/4 v1, 0x0
if-nez v0, :cond_6
.line 344
return v1
.line 346
:cond_6
iget-boolean v2, p0, Lcom/contrarywind/view/WheelView;->isLoop:Z
if-eqz v2, :cond_36
iget v2, p0, Lcom/contrarywind/view/WheelView;->selectedItem:I
if-ltz v2, :cond_14
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
if-lt v2, v0, :cond_36
.line 347
:cond_14
iget v0, p0, Lcom/contrarywind/view/WheelView;->selectedItem:I
invoke-static {v0}, Ljava/lang/Math;->abs(I)I
move-result v0
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
sub-int/2addr v0, v2
invoke-static {v0}, Ljava/lang/Math;->abs(I)I
move-result v0
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
add-int/lit8 v2, v2, -0x1
invoke-static {v0, v2}, Ljava/lang/Math;->min(II)I
move-result v0
invoke-static {v1, v0}, Ljava/lang/Math;->max(II)I
move-result v0
return v0
.line 349
:cond_36
iget v0, p0, Lcom/contrarywind/view/WheelView;->selectedItem:I
iget-object v2, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
add-int/lit8 v2, v2, -0x1
invoke-static {v0, v2}, Ljava/lang/Math;->min(II)I
move-result v0
invoke-static {v1, v0}, Ljava/lang/Math;->max(II)I
move-result v0
return v0
.end method
.method public getHandler()Landroid/os/Handler;
.registers 2
.line 838
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->handler:Landroid/os/Handler;
return-object v0
.end method
.method public getInitPosition()I
.registers 2
.line 833
iget v0, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
return v0
.end method
.method public getItemHeight()F
.registers 2
.line 829
iget v0, p0, Lcom/contrarywind/view/WheelView;->itemHeight:F
return v0
.end method
.method public getItemsCount()I
.registers 2
.line 745
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
if-eqz v0, :cond_9
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
goto :goto_a
:cond_9
const/4 v0, 0x0
:goto_a
return v0
.end method
.method public getTextWidth(Landroid/graphics/Paint;Ljava/lang/String;)I
.registers 9
.param p1, "paint" # Landroid/graphics/Paint;
.param p2, "str" # Ljava/lang/String;
.line 761
const/4 v0, 0x0
.line 762
.local v0, "iRet":I
if-eqz p2, :cond_21
invoke-virtual {p2}, Ljava/lang/String;->length()I
move-result v1
if-lez v1, :cond_21
.line 763
invoke-virtual {p2}, Ljava/lang/String;->length()I
move-result v1
.line 764
.local v1, "len":I
new-array v2, v1, [F
.line 765
.local v2, "widths":[F
invoke-virtual {p1, p2, v2}, Landroid/graphics/Paint;->getTextWidths(Ljava/lang/String;[F)I
.line 766
const/4 v3, 0x0
.local v3, "j":I
:goto_13
if-ge v3, v1, :cond_21
.line 767
aget v4, v2, v3
float-to-double v4, v4
invoke-static {v4, v5}, Ljava/lang/Math;->ceil(D)D
move-result-wide v4
double-to-int v4, v4
add-int/2addr v0, v4
.line 766
add-int/lit8 v3, v3, 0x1
goto :goto_13
.line 770
.end local v1 # "len":I
.end local v2 # "widths":[F
.end local v3 # "j":I
:cond_21
return v0
.end method
.method public getTotalScrollY()F
.registers 2
.line 821
iget v0, p0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
return v0
.end method
.method public isCenterLabel(Z)V
.registers 2
.param p1, "isCenterLabel" # Z
.line 753
iput-boolean p1, p0, Lcom/contrarywind/view/WheelView;->isCenterLabel:Z
.line 754
return-void
.end method
.method public isLoop()Z
.registers 2
.line 817
iget-boolean v0, p0, Lcom/contrarywind/view/WheelView;->isLoop:Z
return v0
.end method
.method protected onDraw(Landroid/graphics/Canvas;)V
.registers 22
.param p1, "canvas" # Landroid/graphics/Canvas;
.line 365
move-object/from16 v1, p0
move-object/from16 v8, p1
iget-object v0, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
if-nez v0, :cond_9
.line 366
return-void
.line 369
:cond_9
iget v0, v1, Lcom/contrarywind/view/WheelView;->initPosition:I
const/4 v9, 0x0
invoke-static {v9, v0}, Ljava/lang/Math;->max(II)I
move-result v0
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
add-int/lit8 v2, v2, -0x1
invoke-static {v0, v2}, Ljava/lang/Math;->min(II)I
move-result v0
iput v0, v1, Lcom/contrarywind/view/WheelView;->initPosition:I
.line 373
iget v2, v1, Lcom/contrarywind/view/WheelView;->totalScrollY:F
iget v3, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
div-float/2addr v2, v3
float-to-int v10, v2
.line 378
.local v10, "change":I
:try_start_24
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
rem-int v2, v10, v2
add-int/2addr v0, v2
iput v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
:try_end_2f
.catch Ljava/lang/ArithmeticException; {:try_start_24 .. :try_end_2f} :catch_30
.line 382
goto :goto_39
.line 380
:catch_30
move-exception v0
.line 381
.local v0, "e":Ljava/lang/ArithmeticException;
const-string v2, "WheelView"
const-string/jumbo v3, "\u51fa\u9519\u4e86\uff01adapter.getItemsCount() == 0\uff0c\u8054\u52a8\u6570\u636e\u4e0d\u5339\u914d"
invoke-static {v2, v3}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
.line 383
.end local v0 # "e":Ljava/lang/ArithmeticException;
:goto_39
iget-boolean v0, v1, Lcom/contrarywind/view/WheelView;->isLoop:Z
if-nez v0, :cond_5a
.line 384
iget v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
if-gez v0, :cond_43
.line 385
iput v9, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
.line 387
:cond_43
iget v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
add-int/lit8 v2, v2, -0x1
if-le v0, v2, :cond_80
.line 388
iget-object v0, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
add-int/lit8 v0, v0, -0x1
iput v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
goto :goto_80
.line 391
:cond_5a
iget v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
if-gez v0, :cond_69
.line 392
iget-object v0, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v0}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v0
iget v2, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
add-int/2addr v0, v2
iput v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
.line 394
:cond_69
iget v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
add-int/lit8 v2, v2, -0x1
if-le v0, v2, :cond_80
.line 395
iget v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v2}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v2
sub-int/2addr v0, v2
iput v0, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
.line 399
:cond_80
:goto_80
iget v0, v1, Lcom/contrarywind/view/WheelView;->totalScrollY:F
iget v2, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
rem-float/2addr v0, v2
.line 403
.local v0, "itemHeightOffset":F
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->dividerType:Lcom/contrarywind/view/WheelView$DividerType;
sget-object v3, Lcom/contrarywind/view/WheelView$DividerType;->WRAP:Lcom/contrarywind/view/WheelView$DividerType;
const/4 v11, 0x0
if-ne v2, v3, :cond_cd
.line 407
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_9f
.line 408
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget v3, v1, Lcom/contrarywind/view/WheelView;->maxTextWidth:I
sub-int/2addr v2, v3
div-int/lit8 v2, v2, 0x2
add-int/lit8 v2, v2, -0xc
int-to-float v2, v2
.local v2, "startX":F
goto :goto_a9
.line 410
.end local v2 # "startX":F
:cond_9f
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget v3, v1, Lcom/contrarywind/view/WheelView;->maxTextWidth:I
sub-int/2addr v2, v3
div-int/lit8 v2, v2, 0x4
add-int/lit8 v2, v2, -0xc
int-to-float v2, v2
.line 413
.restart local v2 # "startX":F
:goto_a9
cmpg-float v3, v2, v11
if-gtz v3, :cond_b1
.line 414
const/high16 v2, 0x41200000 # 10.0f
move v12, v2
goto :goto_b2
.line 413
:cond_b1
move v12, v2
.line 416
.end local v2 # "startX":F
.local v12, "startX":F
:goto_b2
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v2, v2
sub-float v13, v2, v12
.line 417
.local v13, "endX":F
iget v6, v1, Lcom/contrarywind/view/WheelView;->firstLineY:F
iget-object v7, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
move-object/from16 v2, p1
move v3, v12
move v4, v6
move v5, v13
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V
.line 418
iget v6, v1, Lcom/contrarywind/view/WheelView;->secondLineY:F
iget-object v7, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
move v4, v6
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V
.line 419
.end local v12 # "startX":F
.end local v13 # "endX":F
goto/16 :goto_140
:cond_cd
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->dividerType:Lcom/contrarywind/view/WheelView$DividerType;
sget-object v3, Lcom/contrarywind/view/WheelView$DividerType;->CIRCLE:Lcom/contrarywind/view/WheelView$DividerType;
if-ne v2, v3, :cond_125
.line 421
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
sget-object v3, Landroid/graphics/Paint$Style;->STROKE:Landroid/graphics/Paint$Style;
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setStyle(Landroid/graphics/Paint$Style;)V
.line 422
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
iget v3, v1, Lcom/contrarywind/view/WheelView;->dividerWidth:I
int-to-float v3, v3
invoke-virtual {v2, v3}, Landroid/graphics/Paint;->setStrokeWidth(F)V
.line 425
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
const/high16 v3, 0x41400000 # 12.0f
const/high16 v4, 0x40000000 # 2.0f
if-eqz v2, :cond_f7
.line 426
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget v5, v1, Lcom/contrarywind/view/WheelView;->maxTextWidth:I
sub-int/2addr v2, v5
int-to-float v2, v2
div-float/2addr v2, v4
sub-float/2addr v2, v3
.restart local v2 # "startX":F
goto :goto_101
.line 428
.end local v2 # "startX":F
:cond_f7
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget v5, v1, Lcom/contrarywind/view/WheelView;->maxTextWidth:I
sub-int/2addr v2, v5
int-to-float v2, v2
const/high16 v5, 0x40800000 # 4.0f
div-float/2addr v2, v5
sub-float/2addr v2, v3
.line 430
.restart local v2 # "startX":F
:goto_101
cmpg-float v3, v2, v11
if-gtz v3, :cond_107
.line 431
const/high16 v2, 0x41200000 # 10.0f
.line 433
:cond_107
iget v3, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v3, v3
sub-float/2addr v3, v2
.line 435
.local v3, "endX":F
sub-float v5, v3, v2
iget v6, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
invoke-static {v5, v6}, Ljava/lang/Math;->max(FF)F
move-result v5
const v6, 0x3fe66666 # 1.8f
div-float/2addr v5, v6
.line 436
.local v5, "radius":F
iget v6, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v6, v6
div-float/2addr v6, v4
iget v7, v1, Lcom/contrarywind/view/WheelView;->measuredHeight:I
int-to-float v7, v7
div-float/2addr v7, v4
iget-object v4, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
invoke-virtual {v8, v6, v7, v5, v4}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V
.line 437
.end local v2 # "startX":F
.end local v3 # "endX":F
.end local v5 # "radius":F
goto :goto_140
.line 438
:cond_125
const/4 v3, 0x0
iget v6, v1, Lcom/contrarywind/view/WheelView;->firstLineY:F
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v5, v2
iget-object v7, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
move-object/from16 v2, p1
move v4, v6
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V
.line 439
iget v6, v1, Lcom/contrarywind/view/WheelView;->secondLineY:F
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v5, v2
iget-object v7, v1, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
move-object/from16 v2, p1
move v4, v6
invoke-virtual/range {v2 .. v7}, Landroid/graphics/Canvas;->drawLine(FFFFLandroid/graphics/Paint;)V
.line 443
:goto_140
iget-object v2, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v2
if-nez v2, :cond_164
iget-boolean v2, v1, Lcom/contrarywind/view/WheelView;->isCenterLabel:Z
if-eqz v2, :cond_164
.line 445
iget v2, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget-object v3, v1, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
iget-object v4, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
invoke-virtual {v1, v3, v4}, Lcom/contrarywind/view/WheelView;->getTextWidth(Landroid/graphics/Paint;Ljava/lang/String;)I
move-result v3
sub-int/2addr v2, v3
.line 446
.local v2, "drawRightContentStart":I
iget-object v3, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
int-to-float v4, v2
iget v5, v1, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
sub-float/2addr v4, v5
iget v5, v1, Lcom/contrarywind/view/WheelView;->centerY:F
iget-object v6, v1, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v8, v3, v4, v5, v6}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 450
.end local v2 # "drawRightContentStart":I
:cond_164
const/4 v2, 0x0
.line 451
.local v2, "counter":I
:goto_165
iget v3, v1, Lcom/contrarywind/view/WheelView;->itemsVisible:I
if-ge v2, v3, :cond_399
.line 453
iget v4, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
div-int/lit8 v3, v3, 0x2
sub-int/2addr v3, v2
sub-int/2addr v4, v3
.line 456
.local v4, "index":I
iget-boolean v3, v1, Lcom/contrarywind/view/WheelView;->isLoop:Z
if-eqz v3, :cond_17e
.line 457
invoke-direct {v1, v4}, Lcom/contrarywind/view/WheelView;->getLoopMappingIndex(I)I
move-result v4
.line 458
iget-object v3, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v3, v4}, Lcom/contrarywind/adapter/WheelAdapter;->getItem(I)Ljava/lang/Object;
move-result-object v3
.local v3, "showText":Ljava/lang/Object;
goto :goto_196
.line 459
.end local v3 # "showText":Ljava/lang/Object;
:cond_17e
if-gez v4, :cond_183
.line 460
const-string v3, ""
.restart local v3 # "showText":Ljava/lang/Object;
goto :goto_196
.line 461
.end local v3 # "showText":Ljava/lang/Object;
:cond_183
iget-object v3, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v3}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v3
add-int/lit8 v3, v3, -0x1
if-le v4, v3, :cond_190
.line 462
const-string v3, ""
.restart local v3 # "showText":Ljava/lang/Object;
goto :goto_196
.line 464
.end local v3 # "showText":Ljava/lang/Object;
:cond_190
iget-object v3, v1, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v3, v4}, Lcom/contrarywind/adapter/WheelAdapter;->getItem(I)Ljava/lang/Object;
move-result-object v3
.line 467
.restart local v3 # "showText":Ljava/lang/Object;
:goto_196
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 470
iget v5, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
int-to-float v6, v2
mul-float v5, v5, v6
sub-float/2addr v5, v0
iget v6, v1, Lcom/contrarywind/view/WheelView;->radius:I
int-to-float v6, v6
div-float/2addr v5, v6
float-to-double v5, v5
.line 473
.local v5, "radian":D
const-wide v12, 0x4056800000000000L # 90.0
const-wide v14, 0x400921fb54442d18L # Math.PI
invoke-static {v5, v6}, Ljava/lang/Double;->isNaN(D)Z
div-double v14, v5, v14
const-wide v16, 0x4066800000000000L # 180.0
mul-double v14, v14, v16
sub-double/2addr v12, v14
double-to-float v7, v12
.line 476
.local v7, "angle":F
const/high16 v12, 0x42b40000 # 90.0f
cmpl-float v13, v7, v12
if-gtz v13, :cond_385
const/high16 v13, -0x3d4c0000 # -90.0f
cmpg-float v13, v7, v13
if-gez v13, :cond_1d2
move-object/from16 v17, v3
move/from16 v18, v4
move/from16 v16, v10
const/4 v9, 0x0
const/4 v15, 0x0
goto/16 :goto_38d
.line 483
:cond_1d2
iget-boolean v13, v1, Lcom/contrarywind/view/WheelView;->isCenterLabel:Z
if-nez v13, :cond_1fe
iget-object v13, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
invoke-static {v13}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v13
if-nez v13, :cond_1fe
invoke-direct {v1, v3}, Lcom/contrarywind/view/WheelView;->getContentText(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v13
invoke-static {v13}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v13
if-nez v13, :cond_1fe
.line 484
new-instance v13, Ljava/lang/StringBuilder;
invoke-direct {v13}, Ljava/lang/StringBuilder;-><init>()V
invoke-direct {v1, v3}, Lcom/contrarywind/view/WheelView;->getContentText(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v14
invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v14, v1, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
invoke-virtual {v13, v14}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {v13}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v13
.local v13, "contentText":Ljava/lang/String;
goto :goto_202
.line 486
.end local v13 # "contentText":Ljava/lang/String;
:cond_1fe
invoke-direct {v1, v3}, Lcom/contrarywind/view/WheelView;->getContentText(Ljava/lang/Object;)Ljava/lang/String;
move-result-object v13
.line 489
.restart local v13 # "contentText":Ljava/lang/String;
:goto_202
invoke-static {v7}, Ljava/lang/Math;->abs(F)F
move-result v14
div-float/2addr v14, v12
float-to-double v14, v14
move/from16 v16, v10
.end local v10 # "change":I
.local v16, "change":I
const-wide v9, 0x400199999999999aL # 2.2
invoke-static {v14, v15, v9, v10}, Ljava/lang/Math;->pow(DD)D
move-result-wide v9
double-to-float v9, v9
.line 491
.local v9, "offsetCoefficient":F
invoke-direct {v1, v13}, Lcom/contrarywind/view/WheelView;->reMeasureTextSize(Ljava/lang/String;)V
.line 493
invoke-direct {v1, v13}, Lcom/contrarywind/view/WheelView;->measuredCenterContentStart(Ljava/lang/String;)V
.line 494
invoke-direct {v1, v13}, Lcom/contrarywind/view/WheelView;->measuredOutContentStart(Ljava/lang/String;)V
.line 495
iget v10, v1, Lcom/contrarywind/view/WheelView;->radius:I
int-to-double v14, v10
invoke-static {v5, v6}, Ljava/lang/Math;->cos(D)D
move-result-wide v17
iget v10, v1, Lcom/contrarywind/view/WheelView;->radius:I
move-object/from16 v19, v13
.end local v13 # "contentText":Ljava/lang/String;
.local v19, "contentText":Ljava/lang/String;
int-to-double v12, v10
invoke-static {v12, v13}, Ljava/lang/Double;->isNaN(D)Z
mul-double v17, v17, v12
invoke-static {v14, v15}, Ljava/lang/Double;->isNaN(D)Z
sub-double v14, v14, v17
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
move-result-wide v12
iget v10, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
move-object/from16 v17, v3
move/from16 v18, v4
.end local v3 # "showText":Ljava/lang/Object;
.end local v4 # "index":I
.local v17, "showText":Ljava/lang/Object;
.local v18, "index":I
int-to-double v3, v10
invoke-static {v3, v4}, Ljava/lang/Double;->isNaN(D)Z
mul-double v12, v12, v3
const-wide/high16 v3, 0x4000000000000000L # 2.0
div-double/2addr v12, v3
sub-double/2addr v14, v12
double-to-float v3, v14
.line 497
.local v3, "translateY":F
invoke-virtual {v8, v11, v3}, Landroid/graphics/Canvas;->translate(FF)V
.line 498
iget v4, v1, Lcom/contrarywind/view/WheelView;->firstLineY:F
const v10, 0x3f4ccccd # 0.8f
const/high16 v12, 0x3f800000 # 1.0f
cmpg-float v13, v3, v4
if-gtz v13, :cond_2b7
iget v13, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v13, v13
add-float/2addr v13, v3
cmpl-float v4, v13, v4
if-ltz v4, :cond_2b7
.line 500
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 501
iget v4, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v4, v4
iget v13, v1, Lcom/contrarywind/view/WheelView;->firstLineY:F
sub-float/2addr v13, v3
invoke-virtual {v8, v11, v11, v4, v13}, Landroid/graphics/Canvas;->clipRect(FFFF)Z
.line 502
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
move-result-wide v13
double-to-float v4, v13
mul-float v4, v4, v10
invoke-virtual {v8, v12, v4}, Landroid/graphics/Canvas;->scale(FF)V
.line 503
invoke-direct {v1, v9, v7}, Lcom/contrarywind/view/WheelView;->setOutPaintStyle(FF)V
.line 504
iget v4, v1, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
int-to-float v4, v4
iget v10, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v10, v10
iget-object v13, v1, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
move-object/from16 v14, v19
.end local v19 # "contentText":Ljava/lang/String;
.local v14, "contentText":Ljava/lang/String;
invoke-virtual {v8, v14, v4, v10, v13}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 505
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 506
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 507
iget v4, v1, Lcom/contrarywind/view/WheelView;->firstLineY:F
sub-float/2addr v4, v3
iget v10, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v10, v10
iget v13, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
float-to-int v13, v13
int-to-float v13, v13
invoke-virtual {v8, v11, v4, v10, v13}, Landroid/graphics/Canvas;->clipRect(FFFF)Z
.line 508
move v4, v9
.end local v9 # "offsetCoefficient":F
.local v4, "offsetCoefficient":F
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
move-result-wide v9
double-to-float v9, v9
mul-float v9, v9, v12
invoke-virtual {v8, v12, v9}, Landroid/graphics/Canvas;->scale(FF)V
.line 509
iget v9, v1, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
int-to-float v9, v9
iget v10, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v10, v10
iget v12, v1, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
sub-float/2addr v10, v12
iget-object v12, v1, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v8, v14, v9, v10, v12}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 510
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
const/4 v9, 0x0
const/4 v15, 0x0
goto/16 :goto_379
.line 498
.end local v4 # "offsetCoefficient":F
.end local v14 # "contentText":Ljava/lang/String;
.restart local v9 # "offsetCoefficient":F
.restart local v19 # "contentText":Ljava/lang/String;
:cond_2b7
move v4, v9
move-object/from16 v14, v19
.line 511
.end local v9 # "offsetCoefficient":F
.end local v19 # "contentText":Ljava/lang/String;
.restart local v4 # "offsetCoefficient":F
.restart local v14 # "contentText":Ljava/lang/String;
iget v9, v1, Lcom/contrarywind/view/WheelView;->secondLineY:F
cmpg-float v13, v3, v9
if-gtz v13, :cond_320
iget v13, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v13, v13
add-float/2addr v13, v3
cmpl-float v9, v13, v9
if-ltz v9, :cond_320
.line 513
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 514
iget v9, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v9, v9
iget v13, v1, Lcom/contrarywind/view/WheelView;->secondLineY:F
sub-float/2addr v13, v3
invoke-virtual {v8, v11, v11, v9, v13}, Landroid/graphics/Canvas;->clipRect(FFFF)Z
.line 515
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
move-result-wide v10
double-to-float v10, v10
mul-float v10, v10, v12
invoke-virtual {v8, v12, v10}, Landroid/graphics/Canvas;->scale(FF)V
.line 516
iget v10, v1, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
int-to-float v10, v10
iget v11, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v11, v11
iget v15, v1, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
sub-float/2addr v11, v15
iget-object v15, v1, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v8, v14, v10, v11, v15}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 517
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 518
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 519
iget v10, v1, Lcom/contrarywind/view/WheelView;->secondLineY:F
sub-float/2addr v10, v3
iget v11, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
int-to-float v11, v11
iget v15, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
float-to-int v15, v15
int-to-float v15, v15
const/4 v9, 0x0
invoke-virtual {v8, v9, v10, v11, v15}, Landroid/graphics/Canvas;->clipRect(FFFF)Z
.line 520
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
move-result-wide v10
double-to-float v10, v10
const v11, 0x3f4ccccd # 0.8f
mul-float v10, v10, v11
invoke-virtual {v8, v12, v10}, Landroid/graphics/Canvas;->scale(FF)V
.line 521
invoke-direct {v1, v4, v7}, Lcom/contrarywind/view/WheelView;->setOutPaintStyle(FF)V
.line 522
iget v10, v1, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
int-to-float v10, v10
iget v11, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v11, v11
iget-object v12, v1, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
invoke-virtual {v8, v14, v10, v11, v12}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 523
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
const/4 v15, 0x0
goto :goto_379
.line 511
:cond_320
const/4 v9, 0x0
.line 524
iget v10, v1, Lcom/contrarywind/view/WheelView;->firstLineY:F
cmpl-float v10, v3, v10
if-ltz v10, :cond_349
iget v10, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v11, v10
add-float/2addr v11, v3
iget v15, v1, Lcom/contrarywind/view/WheelView;->secondLineY:F
cmpg-float v11, v11, v15
if-gtz v11, :cond_349
.line 528
int-to-float v10, v10
iget v11, v1, Lcom/contrarywind/view/WheelView;->CENTER_CONTENT_OFFSET:F
sub-float/2addr v10, v11
.line 529
.local v10, "Y":F
iget v11, v1, Lcom/contrarywind/view/WheelView;->drawCenterContentStart:I
int-to-float v11, v11
iget-object v12, v1, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v8, v14, v11, v10, v12}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 531
iget v11, v1, Lcom/contrarywind/view/WheelView;->preCurrentIndex:I
iget v12, v1, Lcom/contrarywind/view/WheelView;->itemsVisible:I
div-int/lit8 v12, v12, 0x2
sub-int/2addr v12, v2
sub-int/2addr v11, v12
iput v11, v1, Lcom/contrarywind/view/WheelView;->selectedItem:I
.line 532
.end local v10 # "Y":F
const/4 v15, 0x0
goto :goto_379
.line 534
:cond_349
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
.line 535
iget v10, v1, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget v11, v1, Lcom/contrarywind/view/WheelView;->itemHeight:F
float-to-int v11, v11
const/4 v15, 0x0
invoke-virtual {v8, v15, v15, v10, v11}, Landroid/graphics/Canvas;->clipRect(IIII)Z
.line 536
invoke-static {v5, v6}, Ljava/lang/Math;->sin(D)D
move-result-wide v10
double-to-float v10, v10
const v11, 0x3f4ccccd # 0.8f
mul-float v10, v10, v11
invoke-virtual {v8, v12, v10}, Landroid/graphics/Canvas;->scale(FF)V
.line 537
invoke-direct {v1, v4, v7}, Lcom/contrarywind/view/WheelView;->setOutPaintStyle(FF)V
.line 539
iget v10, v1, Lcom/contrarywind/view/WheelView;->drawOutContentStart:I
int-to-float v10, v10
iget v11, v1, Lcom/contrarywind/view/WheelView;->textXOffset:I
int-to-float v11, v11
mul-float v11, v11, v4
add-float/2addr v10, v11
iget v11, v1, Lcom/contrarywind/view/WheelView;->maxTextHeight:I
int-to-float v11, v11
iget-object v12, v1, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
invoke-virtual {v8, v14, v10, v11, v12}, Landroid/graphics/Canvas;->drawText(Ljava/lang/String;FFLandroid/graphics/Paint;)V
.line 540
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 542
:goto_379
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 543
iget-object v10, v1, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
iget v11, v1, Lcom/contrarywind/view/WheelView;->textSize:I
int-to-float v11, v11
invoke-virtual {v10, v11}, Landroid/graphics/Paint;->setTextSize(F)V
goto :goto_390
.line 476
.end local v14 # "contentText":Ljava/lang/String;
.end local v16 # "change":I
.end local v17 # "showText":Ljava/lang/Object;
.end local v18 # "index":I
.local v3, "showText":Ljava/lang/Object;
.local v4, "index":I
.local v10, "change":I
:cond_385
move-object/from16 v17, v3
move/from16 v18, v4
move/from16 v16, v10
const/4 v9, 0x0
const/4 v15, 0x0
.line 477
.end local v3 # "showText":Ljava/lang/Object;
.end local v4 # "index":I
.end local v10 # "change":I
.restart local v16 # "change":I
.restart local v17 # "showText":Ljava/lang/Object;
.restart local v18 # "index":I
:goto_38d
invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->restore()V
.line 545
:goto_390
nop
.end local v5 # "radian":D
.end local v7 # "angle":F
.end local v17 # "showText":Ljava/lang/Object;
.end local v18 # "index":I
add-int/lit8 v2, v2, 0x1
.line 546
move/from16 v10, v16
const/4 v9, 0x0
const/4 v11, 0x0
goto/16 :goto_165
.line 547
.end local v16 # "change":I
.restart local v10 # "change":I
:cond_399
return-void
.end method
.method public final onItemSelected()V
.registers 4
.line 353
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->onItemSelectedListener:Lcom/contrarywind/listener/OnItemSelectedListener;
if-eqz v0, :cond_e
.line 354
new-instance v0, Lcom/contrarywind/view/WheelView$1;
invoke-direct {v0, p0}, Lcom/contrarywind/view/WheelView$1;-><init>(Lcom/contrarywind/view/WheelView;)V
const-wide/16 v1, 0xc8
invoke-virtual {p0, v0, v1, v2}, Lcom/contrarywind/view/WheelView;->postDelayed(Ljava/lang/Runnable;J)Z
.line 361
:cond_e
return-void
.end method
.method protected onMeasure(II)V
.registers 5
.param p1, "widthMeasureSpec" # I
.param p2, "heightMeasureSpec" # I
.line 665
iput p1, p0, Lcom/contrarywind/view/WheelView;->widthMeasureSpec:I
.line 666
invoke-direct {p0}, Lcom/contrarywind/view/WheelView;->reMeasure()V
.line 667
iget v0, p0, Lcom/contrarywind/view/WheelView;->measuredWidth:I
iget v1, p0, Lcom/contrarywind/view/WheelView;->measuredHeight:I
invoke-virtual {p0, v0, v1}, Lcom/contrarywind/view/WheelView;->setMeasuredDimension(II)V
.line 668
return-void
.end method
.method public onTouchEvent(Landroid/view/MotionEvent;)Z
.registers 18
.param p1, "event" # Landroid/view/MotionEvent;
.line 672
move-object/from16 v0, p0
iget-object v1, v0, Lcom/contrarywind/view/WheelView;->gestureDetector:Landroid/view/GestureDetector;
move-object/from16 v2, p1
invoke-virtual {v1, v2}, Landroid/view/GestureDetector;->onTouchEvent(Landroid/view/MotionEvent;)Z
move-result v1
.line 673
.local v1, "eventConsumed":Z
const/4 v3, 0x0
.line 675
.local v3, "isIgnore":Z
iget v4, v0, Lcom/contrarywind/view/WheelView;->initPosition:I
neg-int v4, v4
int-to-float v4, v4
iget v5, v0, Lcom/contrarywind/view/WheelView;->itemHeight:F
mul-float v4, v4, v5
.line 676
.local v4, "top":F
iget-object v5, v0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
invoke-interface {v5}, Lcom/contrarywind/adapter/WheelAdapter;->getItemsCount()I
move-result v5
const/4 v6, 0x1
sub-int/2addr v5, v6
iget v7, v0, Lcom/contrarywind/view/WheelView;->initPosition:I
sub-int/2addr v5, v7
int-to-float v5, v5
iget v7, v0, Lcom/contrarywind/view/WheelView;->itemHeight:F
mul-float v5, v5, v7
.line 677
.local v5, "bottom":F
const/high16 v7, 0x3e800000 # 0.25f
.line 679
.local v7, "ratio":F
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getAction()I
move-result v8
if-eqz v8, :cond_c5
const/4 v9, 0x2
if-eq v8, v9, :cond_87
.line 706
if-nez v1, :cond_84
.line 720
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getY()F
move-result v8
.line 721
.local v8, "y":F
iget v10, v0, Lcom/contrarywind/view/WheelView;->radius:I
int-to-float v11, v10
sub-float/2addr v11, v8
int-to-float v10, v10
div-float/2addr v11, v10
float-to-double v10, v11
invoke-static {v10, v11}, Ljava/lang/Math;->acos(D)D
move-result-wide v10
iget v12, v0, Lcom/contrarywind/view/WheelView;->radius:I
int-to-double v12, v12
invoke-static {v12, v13}, Ljava/lang/Double;->isNaN(D)Z
mul-double v10, v10, v12
.line 723
.local v10, "L":D
iget v12, v0, Lcom/contrarywind/view/WheelView;->itemHeight:F
const/high16 v13, 0x40000000 # 2.0f
div-float v13, v12, v13
float-to-double v13, v13
invoke-static {v13, v14}, Ljava/lang/Double;->isNaN(D)Z
add-double/2addr v13, v10
move v15, v7
.end local v7 # "ratio":F
.local v15, "ratio":F
float-to-double v6, v12
invoke-static {v6, v7}, Ljava/lang/Double;->isNaN(D)Z
div-double/2addr v13, v6
double-to-int v6, v13
.line 724
.local v6, "circlePosition":I
iget v7, v0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
rem-float/2addr v7, v12
add-float/2addr v7, v12
rem-float/2addr v7, v12
.line 726
.local v7, "extraOffset":F
iget v13, v0, Lcom/contrarywind/view/WheelView;->itemsVisible:I
div-int/2addr v13, v9
sub-int v9, v6, v13
int-to-float v9, v9
mul-float v9, v9, v12
sub-float/2addr v9, v7
float-to-int v9, v9
iput v9, v0, Lcom/contrarywind/view/WheelView;->mOffset:I
.line 728
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v12
move v9, v1
.end local v1 # "eventConsumed":Z
.local v9, "eventConsumed":Z
iget-wide v1, v0, Lcom/contrarywind/view/WheelView;->startTime:J
sub-long/2addr v12, v1
const-wide/16 v1, 0x78
cmp-long v14, v12, v1
if-lez v14, :cond_7e
.line 730
sget-object v1, Lcom/contrarywind/view/WheelView$ACTION;->DAGGLE:Lcom/contrarywind/view/WheelView$ACTION;
invoke-virtual {v0, v1}, Lcom/contrarywind/view/WheelView;->smoothScroll(Lcom/contrarywind/view/WheelView$ACTION;)V
goto :goto_d7
.line 733
:cond_7e
sget-object v1, Lcom/contrarywind/view/WheelView$ACTION;->CLICK:Lcom/contrarywind/view/WheelView$ACTION;
invoke-virtual {v0, v1}, Lcom/contrarywind/view/WheelView;->smoothScroll(Lcom/contrarywind/view/WheelView$ACTION;)V
goto :goto_d7
.line 706
.end local v6 # "circlePosition":I
.end local v8 # "y":F
.end local v9 # "eventConsumed":Z
.end local v10 # "L":D
.end local v15 # "ratio":F
.restart local v1 # "eventConsumed":Z
.local v7, "ratio":F
:cond_84
move v9, v1
move v15, v7
.end local v1 # "eventConsumed":Z
.end local v7 # "ratio":F
.restart local v9 # "eventConsumed":Z
.restart local v15 # "ratio":F
goto :goto_d7
.line 687
.end local v9 # "eventConsumed":Z
.end local v15 # "ratio":F
.restart local v1 # "eventConsumed":Z
.restart local v7 # "ratio":F
:cond_87
move v9, v1
move v15, v7
.end local v1 # "eventConsumed":Z
.end local v7 # "ratio":F
.restart local v9 # "eventConsumed":Z
.restart local v15 # "ratio":F
iget v1, v0, Lcom/contrarywind/view/WheelView;->previousY:F
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getRawY()F
move-result v2
sub-float/2addr v1, v2
.line 688
.local v1, "dy":F
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getRawY()F
move-result v2
iput v2, v0, Lcom/contrarywind/view/WheelView;->previousY:F
.line 689
iget v2, v0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
add-float/2addr v2, v1
iput v2, v0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
.line 692
iget-boolean v6, v0, Lcom/contrarywind/view/WheelView;->isLoop:Z
if-nez v6, :cond_d7
.line 693
iget v6, v0, Lcom/contrarywind/view/WheelView;->itemHeight:F
mul-float v6, v6, v15
sub-float/2addr v2, v6
const/4 v6, 0x0
cmpg-float v2, v2, v4
if-gez v2, :cond_ad
cmpg-float v2, v1, v6
if-ltz v2, :cond_bc
:cond_ad
iget v2, v0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
iget v7, v0, Lcom/contrarywind/view/WheelView;->itemHeight:F
mul-float v7, v7, v15
add-float/2addr v2, v7
cmpl-float v2, v2, v5
if-lez v2, :cond_c3
cmpl-float v2, v1, v6
if-lez v2, :cond_c3
.line 696
:cond_bc
iget v2, v0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
sub-float/2addr v2, v1
iput v2, v0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
.line 697
const/4 v3, 0x1
goto :goto_d7
.line 699
:cond_c3
const/4 v3, 0x0
goto :goto_d7
.line 681
.end local v9 # "eventConsumed":Z
.end local v15 # "ratio":F
.local v1, "eventConsumed":Z
.restart local v7 # "ratio":F
:cond_c5
move v9, v1
move v15, v7
.end local v1 # "eventConsumed":Z
.end local v7 # "ratio":F
.restart local v9 # "eventConsumed":Z
.restart local v15 # "ratio":F
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v1
iput-wide v1, v0, Lcom/contrarywind/view/WheelView;->startTime:J
.line 682
invoke-virtual/range {p0 .. p0}, Lcom/contrarywind/view/WheelView;->cancelFuture()V
.line 683
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getRawY()F
move-result v1
iput v1, v0, Lcom/contrarywind/view/WheelView;->previousY:F
.line 684
nop
.line 738
:cond_d7
:goto_d7
if-nez v3, :cond_e2
invoke-virtual/range {p1 .. p1}, Landroid/view/MotionEvent;->getAction()I
move-result v1
if-eqz v1, :cond_e2
.line 739
invoke-virtual/range {p0 .. p0}, Lcom/contrarywind/view/WheelView;->invalidate()V
.line 741
:cond_e2
const/4 v1, 0x1
return v1
.end method
.method public final scrollBy(F)V
.registers 9
.param p1, "velocityY" # F
.line 274
invoke-virtual {p0}, Lcom/contrarywind/view/WheelView;->cancelFuture()V
.line 275
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->mExecutor:Ljava/util/concurrent/ScheduledExecutorService;
new-instance v1, Lcom/contrarywind/timer/InertiaTimerTask;
invoke-direct {v1, p0, p1}, Lcom/contrarywind/timer/InertiaTimerTask;-><init>(Lcom/contrarywind/view/WheelView;F)V
sget-object v6, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
const-wide/16 v2, 0x0
const-wide/16 v4, 0x5
invoke-interface/range {v0 .. v6}, Ljava/util/concurrent/ScheduledExecutorService;->scheduleWithFixedDelay(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
move-result-object v0
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->mFuture:Ljava/util/concurrent/ScheduledFuture;
.line 276
return-void
.end method
.method public final setAdapter(Lcom/contrarywind/adapter/WheelAdapter;)V
.registers 2
.param p1, "adapter" # Lcom/contrarywind/adapter/WheelAdapter;
.line 321
iput-object p1, p0, Lcom/contrarywind/view/WheelView;->adapter:Lcom/contrarywind/adapter/WheelAdapter;
.line 322
invoke-direct {p0}, Lcom/contrarywind/view/WheelView;->reMeasure()V
.line 323
invoke-virtual {p0}, Lcom/contrarywind/view/WheelView;->invalidate()V
.line 324
return-void
.end method
.method public setAlphaGradient(Z)V
.registers 2
.param p1, "alphaGradient" # Z
.line 334
iput-boolean p1, p0, Lcom/contrarywind/view/WheelView;->isAlphaGradient:Z
.line 335
return-void
.end method
.method public final setCurrentItem(I)V
.registers 3
.param p1, "currentItem" # I
.line 310
iput p1, p0, Lcom/contrarywind/view/WheelView;->selectedItem:I
.line 311
iput p1, p0, Lcom/contrarywind/view/WheelView;->initPosition:I
.line 312
const/4 v0, 0x0
iput v0, p0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
.line 313
invoke-virtual {p0}, Lcom/contrarywind/view/WheelView;->invalidate()V
.line 314
return-void
.end method
.method public final setCyclic(Z)V
.registers 2
.param p1, "cyclic" # Z
.line 291
iput-boolean p1, p0, Lcom/contrarywind/view/WheelView;->isLoop:Z
.line 292
return-void
.end method
.method public setDividerColor(I)V
.registers 3
.param p1, "dividerColor" # I
.line 801
iput p1, p0, Lcom/contrarywind/view/WheelView;->dividerColor:I
.line 802
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setColor(I)V
.line 803
return-void
.end method
.method public setDividerType(Lcom/contrarywind/view/WheelView$DividerType;)V
.registers 2
.param p1, "dividerType" # Lcom/contrarywind/view/WheelView$DividerType;
.line 806
iput-object p1, p0, Lcom/contrarywind/view/WheelView;->dividerType:Lcom/contrarywind/view/WheelView$DividerType;
.line 807
return-void
.end method
.method public setDividerWidth(I)V
.registers 4
.param p1, "dividerWidth" # I
.line 796
iput p1, p0, Lcom/contrarywind/view/WheelView;->dividerWidth:I
.line 797
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintIndicator:Landroid/graphics/Paint;
int-to-float v1, p1
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setStrokeWidth(F)V
.line 798
return-void
.end method
.method public setGravity(I)V
.registers 2
.param p1, "gravity" # I
.line 757
iput p1, p0, Lcom/contrarywind/view/WheelView;->mGravity:I
.line 758
return-void
.end method
.method public setIsOptions(Z)V
.registers 2
.param p1, "options" # Z
.line 774
iput-boolean p1, p0, Lcom/contrarywind/view/WheelView;->isOptions:Z
.line 775
return-void
.end method
.method public setItemsVisibleCount(I)V
.registers 3
.param p1, "visibleCount" # I
.line 327
rem-int/lit8 v0, p1, 0x2
if-nez v0, :cond_6
.line 328
add-int/lit8 p1, p1, 0x1
.line 330
:cond_6
add-int/lit8 v0, p1, 0x2
iput v0, p0, Lcom/contrarywind/view/WheelView;->itemsVisible:I
.line 331
return-void
.end method
.method public setLabel(Ljava/lang/String;)V
.registers 2
.param p1, "label" # Ljava/lang/String;
.line 749
iput-object p1, p0, Lcom/contrarywind/view/WheelView;->label:Ljava/lang/String;
.line 750
return-void
.end method
.method public setLineSpacingMultiplier(F)V
.registers 3
.param p1, "lineSpacingMultiplier" # F
.line 810
const/4 v0, 0x0
cmpl-float v0, p1, v0
if-eqz v0, :cond_a
.line 811
iput p1, p0, Lcom/contrarywind/view/WheelView;->lineSpacingMultiplier:F
.line 812
invoke-direct {p0}, Lcom/contrarywind/view/WheelView;->judgeLineSpace()V
.line 814
:cond_a
return-void
.end method
.method public final setOnItemSelectedListener(Lcom/contrarywind/listener/OnItemSelectedListener;)V
.registers 2
.param p1, "OnItemSelectedListener" # Lcom/contrarywind/listener/OnItemSelectedListener;
.line 317
iput-object p1, p0, Lcom/contrarywind/view/WheelView;->onItemSelectedListener:Lcom/contrarywind/listener/OnItemSelectedListener;
.line 318
return-void
.end method
.method public setTextColorCenter(I)V
.registers 3
.param p1, "textColorCenter" # I
.line 784
iput p1, p0, Lcom/contrarywind/view/WheelView;->textColorCenter:I
.line 785
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setColor(I)V
.line 786
return-void
.end method
.method public setTextColorOut(I)V
.registers 3
.param p1, "textColorOut" # I
.line 779
iput p1, p0, Lcom/contrarywind/view/WheelView;->textColorOut:I
.line 780
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setColor(I)V
.line 781
return-void
.end method
.method public final setTextSize(F)V
.registers 4
.param p1, "size" # F
.line 301
const/4 v0, 0x0
cmpl-float v0, p1, v0
if-lez v0, :cond_24
.line 302
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->context:Landroid/content/Context;
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v0
invoke-virtual {v0}, Landroid/content/res/Resources;->getDisplayMetrics()Landroid/util/DisplayMetrics;
move-result-object v0
iget v0, v0, Landroid/util/DisplayMetrics;->density:F
mul-float v0, v0, p1
float-to-int v0, v0
iput v0, p0, Lcom/contrarywind/view/WheelView;->textSize:I
.line 303
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
int-to-float v0, v0
invoke-virtual {v1, v0}, Landroid/graphics/Paint;->setTextSize(F)V
.line 304
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
iget v1, p0, Lcom/contrarywind/view/WheelView;->textSize:I
int-to-float v1, v1
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextSize(F)V
.line 306
:cond_24
return-void
.end method
.method public setTextXOffset(I)V
.registers 4
.param p1, "textXOffset" # I
.line 789
iput p1, p0, Lcom/contrarywind/view/WheelView;->textXOffset:I
.line 790
if-eqz p1, :cond_b
.line 791
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
const/high16 v1, 0x3f800000 # 1.0f
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTextScaleX(F)V
.line 793
:cond_b
return-void
.end method
.method public setTotalScrollY(F)V
.registers 2
.param p1, "totalScrollY" # F
.line 825
iput p1, p0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
.line 826
return-void
.end method
.method public final setTypeface(Landroid/graphics/Typeface;)V
.registers 4
.param p1, "font" # Landroid/graphics/Typeface;
.line 295
iput-object p1, p0, Lcom/contrarywind/view/WheelView;->typeface:Landroid/graphics/Typeface;
.line 296
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintOuterText:Landroid/graphics/Paint;
invoke-virtual {v0, p1}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
.line 297
iget-object v0, p0, Lcom/contrarywind/view/WheelView;->paintCenterText:Landroid/graphics/Paint;
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->typeface:Landroid/graphics/Typeface;
invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setTypeface(Landroid/graphics/Typeface;)Landroid/graphics/Typeface;
.line 298
return-void
.end method
.method public smoothScroll(Lcom/contrarywind/view/WheelView$ACTION;)V
.registers 10
.param p1, "action" # Lcom/contrarywind/view/WheelView$ACTION;
.line 260
invoke-virtual {p0}, Lcom/contrarywind/view/WheelView;->cancelFuture()V
.line 261
sget-object v0, Lcom/contrarywind/view/WheelView$ACTION;->FLING:Lcom/contrarywind/view/WheelView$ACTION;
if-eq p1, v0, :cond_b
sget-object v0, Lcom/contrarywind/view/WheelView$ACTION;->DAGGLE:Lcom/contrarywind/view/WheelView$ACTION;
if-ne p1, v0, :cond_27
.line 262
:cond_b
iget v0, p0, Lcom/contrarywind/view/WheelView;->totalScrollY:F
iget v1, p0, Lcom/contrarywind/view/WheelView;->itemHeight:F
rem-float/2addr v0, v1
add-float/2addr v0, v1
rem-float/2addr v0, v1
float-to-int v0, v0
iput v0, p0, Lcom/contrarywind/view/WheelView;->mOffset:I
.line 263
int-to-float v2, v0
const/high16 v3, 0x40000000 # 2.0f
div-float v3, v1, v3
cmpl-float v2, v2, v3
if-lez v2, :cond_24
.line 264
int-to-float v0, v0
sub-float/2addr v1, v0
float-to-int v0, v1
iput v0, p0, Lcom/contrarywind/view/WheelView;->mOffset:I
goto :goto_27
.line 266
:cond_24
neg-int v0, v0
iput v0, p0, Lcom/contrarywind/view/WheelView;->mOffset:I
.line 270
:cond_27
:goto_27
iget-object v1, p0, Lcom/contrarywind/view/WheelView;->mExecutor:Ljava/util/concurrent/ScheduledExecutorService;
new-instance v2, Lcom/contrarywind/timer/SmoothScrollTimerTask;
iget v0, p0, Lcom/contrarywind/view/WheelView;->mOffset:I
invoke-direct {v2, p0, v0}, Lcom/contrarywind/timer/SmoothScrollTimerTask;-><init>(Lcom/contrarywind/view/WheelView;I)V
const-wide/16 v3, 0x0
const-wide/16 v5, 0xa
sget-object v7, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
invoke-interface/range {v1 .. v7}, Ljava/util/concurrent/ScheduledExecutorService;->scheduleWithFixedDelay(Ljava/lang/Runnable;JJLjava/util/concurrent/TimeUnit;)Ljava/util/concurrent/ScheduledFuture;
move-result-object v0
iput-object v0, p0, Lcom/contrarywind/view/WheelView;->mFuture:Ljava/util/concurrent/ScheduledFuture;
.line 271
return-void
.end method