SwipeProgressBar.smali 25 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072
  1. .class final Landroid/support/v4/widget/SwipeProgressBar;
  2. .super Ljava/lang/Object;
  3. .source "SwipeProgressBar.java"
  4. # static fields
  5. .field private static final ANIMATION_DURATION_MS:I = 0x7d0
  6. .field private static final COLOR1:I = -0x4d000000
  7. .field private static final COLOR2:I = -0x80000000
  8. .field private static final COLOR3:I = 0x4d000000
  9. .field private static final COLOR4:I = 0x1a000000
  10. .field private static final FINISH_ANIMATION_DURATION_MS:I = 0x3e8
  11. .field private static final INTERPOLATOR:Landroid/view/animation/Interpolator;
  12. # instance fields
  13. .field private mBounds:Landroid/graphics/Rect;
  14. .field private final mClipRect:Landroid/graphics/RectF;
  15. .field private mColor1:I
  16. .field private mColor2:I
  17. .field private mColor3:I
  18. .field private mColor4:I
  19. .field private mFinishTime:J
  20. .field private final mPaint:Landroid/graphics/Paint;
  21. .field private mParent:Landroid/view/View;
  22. .field private mRunning:Z
  23. .field private mStartTime:J
  24. .field private mTriggerPercentage:F
  25. # direct methods
  26. .method static constructor <clinit>()V
  27. .locals 1
  28. .prologue
  29. .line 52
  30. new-instance v0, Landroid/support/v4/view/animation/FastOutSlowInInterpolator;
  31. invoke-direct {v0}, Landroid/support/v4/view/animation/FastOutSlowInInterpolator;-><init>()V
  32. sput-object v0, Landroid/support/v4/widget/SwipeProgressBar;->INTERPOLATOR:Landroid/view/animation/Interpolator;
  33. return-void
  34. .end method
  35. .method public constructor <init>(Landroid/view/View;)V
  36. .locals 1
  37. .param p1, "parent" # Landroid/view/View;
  38. .prologue
  39. .line 70
  40. invoke-direct {p0}, Ljava/lang/Object;-><init>()V
  41. .line 54
  42. new-instance v0, Landroid/graphics/Paint;
  43. invoke-direct {v0}, Landroid/graphics/Paint;-><init>()V
  44. iput-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mPaint:Landroid/graphics/Paint;
  45. .line 55
  46. new-instance v0, Landroid/graphics/RectF;
  47. invoke-direct {v0}, Landroid/graphics/RectF;-><init>()V
  48. iput-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mClipRect:Landroid/graphics/RectF;
  49. .line 68
  50. new-instance v0, Landroid/graphics/Rect;
  51. invoke-direct {v0}, Landroid/graphics/Rect;-><init>()V
  52. iput-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  53. .line 71
  54. iput-object p1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mParent:Landroid/view/View;
  55. .line 72
  56. const/high16 v0, -0x4d000000
  57. iput v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  58. .line 73
  59. const/high16 v0, -0x80000000
  60. iput v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor2:I
  61. .line 74
  62. const/high16 v0, 0x4d000000 # 1.34217728E8f
  63. iput v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor3:I
  64. .line 75
  65. const/high16 v0, 0x1a000000
  66. iput v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor4:I
  67. .line 76
  68. return-void
  69. .end method
  70. .method private drawCircle(Landroid/graphics/Canvas;FFIF)V
  71. .locals 3
  72. .param p1, "canvas" # Landroid/graphics/Canvas;
  73. .param p2, "cx" # F
  74. .param p3, "cy" # F
  75. .param p4, "color" # I
  76. .param p5, "pct" # F
  77. .prologue
  78. const/4 v2, 0x0
  79. .line 258
  80. iget-object v1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mPaint:Landroid/graphics/Paint;
  81. invoke-virtual {v1, p4}, Landroid/graphics/Paint;->setColor(I)V
  82. .line 259
  83. invoke-virtual {p1}, Landroid/graphics/Canvas;->save()I
  84. .line 260
  85. invoke-virtual {p1, p2, p3}, Landroid/graphics/Canvas;->translate(FF)V
  86. .line 261
  87. sget-object v1, Landroid/support/v4/widget/SwipeProgressBar;->INTERPOLATOR:Landroid/view/animation/Interpolator;
  88. invoke-interface {v1, p5}, Landroid/view/animation/Interpolator;->getInterpolation(F)F
  89. move-result v0
  90. .line 262
  91. .local v0, "radiusScale":F
  92. invoke-virtual {p1, v0, v0}, Landroid/graphics/Canvas;->scale(FF)V
  93. .line 263
  94. iget-object v1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mPaint:Landroid/graphics/Paint;
  95. invoke-virtual {p1, v2, v2, p2, v1}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V
  96. .line 264
  97. invoke-virtual {p1}, Landroid/graphics/Canvas;->restore()V
  98. .line 265
  99. return-void
  100. .end method
  101. .method private drawTrigger(Landroid/graphics/Canvas;II)V
  102. .locals 4
  103. .param p1, "canvas" # Landroid/graphics/Canvas;
  104. .param p2, "cx" # I
  105. .param p3, "cy" # I
  106. .prologue
  107. .line 244
  108. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mPaint:Landroid/graphics/Paint;
  109. iget v1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  110. invoke-virtual {v0, v1}, Landroid/graphics/Paint;->setColor(I)V
  111. .line 245
  112. int-to-float v0, p2
  113. int-to-float v1, p3
  114. int-to-float v2, p2
  115. iget v3, p0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  116. mul-float/2addr v2, v3
  117. iget-object v3, p0, Landroid/support/v4/widget/SwipeProgressBar;->mPaint:Landroid/graphics/Paint;
  118. invoke-virtual {p1, v0, v1, v2, v3}, Landroid/graphics/Canvas;->drawCircle(FFFLandroid/graphics/Paint;)V
  119. .line 246
  120. return-void
  121. .end method
  122. # virtual methods
  123. .method draw(Landroid/graphics/Canvas;)V
  124. .locals 25
  125. .param p1, "canvas" # Landroid/graphics/Canvas;
  126. .prologue
  127. .line 139
  128. move-object/from16 v0, p0
  129. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  130. invoke-virtual {v2}, Landroid/graphics/Rect;->width()I
  131. move-result v24
  132. .line 140
  133. .local v24, "width":I
  134. move-object/from16 v0, p0
  135. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  136. invoke-virtual {v2}, Landroid/graphics/Rect;->height()I
  137. move-result v17
  138. .line 141
  139. .local v17, "height":I
  140. div-int/lit8 v9, v24, 0x2
  141. .line 142
  142. .local v9, "cx":I
  143. div-int/lit8 v10, v17, 0x2
  144. .line 143
  145. .local v10, "cy":I
  146. const/4 v11, 0x0
  147. .line 144
  148. .local v11, "drawTriggerWhileFinishing":Z
  149. invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
  150. move-result v23
  151. .line 145
  152. .local v23, "restoreCount":I
  153. move-object/from16 v0, p0
  154. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  155. move-object/from16 v0, p1
  156. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->clipRect(Landroid/graphics/Rect;)Z
  157. .line 147
  158. move-object/from16 v0, p0
  159. iget-boolean v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  160. if-nez v2, :cond_0
  161. move-object/from16 v0, p0
  162. iget-wide v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mFinishTime:J
  163. const-wide/16 v4, 0x0
  164. cmp-long v2, v2, v4
  165. if-lez v2, :cond_e
  166. .line 148
  167. :cond_0
  168. invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J
  169. move-result-wide v20
  170. .line 149
  171. .local v20, "now":J
  172. move-object/from16 v0, p0
  173. iget-wide v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mStartTime:J
  174. sub-long v2, v20, v2
  175. const-wide/16 v4, 0x7d0
  176. rem-long v12, v2, v4
  177. .line 150
  178. .local v12, "elapsed":J
  179. move-object/from16 v0, p0
  180. iget-wide v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mStartTime:J
  181. sub-long v2, v20, v2
  182. const-wide/16 v4, 0x7d0
  183. div-long v18, v2, v4
  184. .line 151
  185. .local v18, "iterations":J
  186. long-to-float v2, v12
  187. const/high16 v3, 0x41a00000 # 20.0f
  188. div-float v22, v2, v3
  189. .line 155
  190. .local v22, "rawProgress":F
  191. move-object/from16 v0, p0
  192. iget-boolean v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  193. if-nez v2, :cond_2
  194. .line 158
  195. move-object/from16 v0, p0
  196. iget-wide v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mFinishTime:J
  197. sub-long v2, v20, v2
  198. const-wide/16 v4, 0x3e8
  199. cmp-long v2, v2, v4
  200. if-ltz v2, :cond_1
  201. .line 159
  202. const-wide/16 v2, 0x0
  203. move-object/from16 v0, p0
  204. iput-wide v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mFinishTime:J
  205. .line 241
  206. .end local v12 # "elapsed":J
  207. .end local v18 # "iterations":J
  208. .end local v20 # "now":J
  209. .end local v22 # "rawProgress":F
  210. :goto_0
  211. return-void
  212. .line 166
  213. .restart local v12 # "elapsed":J
  214. .restart local v18 # "iterations":J
  215. .restart local v20 # "now":J
  216. .restart local v22 # "rawProgress":F
  217. :cond_1
  218. move-object/from16 v0, p0
  219. iget-wide v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mFinishTime:J
  220. sub-long v2, v20, v2
  221. const-wide/16 v4, 0x3e8
  222. rem-long v14, v2, v4
  223. .line 167
  224. .local v14, "finishElapsed":J
  225. long-to-float v2, v14
  226. const/high16 v3, 0x41200000 # 10.0f
  227. div-float v16, v2, v3
  228. .line 168
  229. .local v16, "finishProgress":F
  230. const/high16 v2, 0x42c80000 # 100.0f
  231. div-float v7, v16, v2
  232. .line 170
  233. .local v7, "pct":F
  234. div-int/lit8 v2, v24, 0x2
  235. int-to-float v2, v2
  236. sget-object v3, Landroid/support/v4/widget/SwipeProgressBar;->INTERPOLATOR:Landroid/view/animation/Interpolator;
  237. invoke-interface {v3, v7}, Landroid/view/animation/Interpolator;->getInterpolation(F)F
  238. move-result v3
  239. mul-float v8, v2, v3
  240. .line 171
  241. .local v8, "clearRadius":F
  242. move-object/from16 v0, p0
  243. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mClipRect:Landroid/graphics/RectF;
  244. int-to-float v3, v9
  245. sub-float/2addr v3, v8
  246. const/4 v4, 0x0
  247. int-to-float v5, v9
  248. add-float/2addr v5, v8
  249. move/from16 v0, v17
  250. int-to-float v6, v0
  251. invoke-virtual {v2, v3, v4, v5, v6}, Landroid/graphics/RectF;->set(FFFF)V
  252. .line 172
  253. move-object/from16 v0, p0
  254. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mClipRect:Landroid/graphics/RectF;
  255. const/4 v3, 0x0
  256. const/4 v4, 0x0
  257. move-object/from16 v0, p1
  258. invoke-virtual {v0, v2, v3, v4}, Landroid/graphics/Canvas;->saveLayerAlpha(Landroid/graphics/RectF;II)I
  259. .line 177
  260. const/4 v11, 0x1
  261. .line 181
  262. .end local v7 # "pct":F
  263. .end local v8 # "clearRadius":F
  264. .end local v14 # "finishElapsed":J
  265. .end local v16 # "finishProgress":F
  266. :cond_2
  267. const-wide/16 v2, 0x0
  268. cmp-long v2, v18, v2
  269. if-nez v2, :cond_a
  270. .line 182
  271. move-object/from16 v0, p0
  272. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  273. move-object/from16 v0, p1
  274. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->drawColor(I)V
  275. .line 201
  276. :goto_1
  277. const/4 v2, 0x0
  278. cmpl-float v2, v22, v2
  279. if-ltz v2, :cond_3
  280. const/high16 v2, 0x41c80000 # 25.0f
  281. cmpg-float v2, v22, v2
  282. if-gtz v2, :cond_3
  283. .line 202
  284. const/high16 v2, 0x41c80000 # 25.0f
  285. add-float v2, v2, v22
  286. const/high16 v3, 0x40000000 # 2.0f
  287. mul-float/2addr v2, v3
  288. const/high16 v3, 0x42c80000 # 100.0f
  289. div-float v7, v2, v3
  290. .line 203
  291. .restart local v7 # "pct":F
  292. int-to-float v4, v9
  293. int-to-float v5, v10
  294. move-object/from16 v0, p0
  295. iget v6, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  296. move-object/from16 v2, p0
  297. move-object/from16 v3, p1
  298. invoke-direct/range {v2 .. v7}, Landroid/support/v4/widget/SwipeProgressBar;->drawCircle(Landroid/graphics/Canvas;FFIF)V
  299. .line 205
  300. .end local v7 # "pct":F
  301. :cond_3
  302. const/4 v2, 0x0
  303. cmpl-float v2, v22, v2
  304. if-ltz v2, :cond_4
  305. const/high16 v2, 0x42480000 # 50.0f
  306. cmpg-float v2, v22, v2
  307. if-gtz v2, :cond_4
  308. .line 206
  309. const/high16 v2, 0x40000000 # 2.0f
  310. mul-float v2, v2, v22
  311. const/high16 v3, 0x42c80000 # 100.0f
  312. div-float v7, v2, v3
  313. .line 207
  314. .restart local v7 # "pct":F
  315. int-to-float v4, v9
  316. int-to-float v5, v10
  317. move-object/from16 v0, p0
  318. iget v6, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor2:I
  319. move-object/from16 v2, p0
  320. move-object/from16 v3, p1
  321. invoke-direct/range {v2 .. v7}, Landroid/support/v4/widget/SwipeProgressBar;->drawCircle(Landroid/graphics/Canvas;FFIF)V
  322. .line 209
  323. .end local v7 # "pct":F
  324. :cond_4
  325. const/high16 v2, 0x41c80000 # 25.0f
  326. cmpl-float v2, v22, v2
  327. if-ltz v2, :cond_5
  328. const/high16 v2, 0x42960000 # 75.0f
  329. cmpg-float v2, v22, v2
  330. if-gtz v2, :cond_5
  331. .line 210
  332. const/high16 v2, 0x41c80000 # 25.0f
  333. sub-float v2, v22, v2
  334. const/high16 v3, 0x40000000 # 2.0f
  335. mul-float/2addr v2, v3
  336. const/high16 v3, 0x42c80000 # 100.0f
  337. div-float v7, v2, v3
  338. .line 211
  339. .restart local v7 # "pct":F
  340. int-to-float v4, v9
  341. int-to-float v5, v10
  342. move-object/from16 v0, p0
  343. iget v6, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor3:I
  344. move-object/from16 v2, p0
  345. move-object/from16 v3, p1
  346. invoke-direct/range {v2 .. v7}, Landroid/support/v4/widget/SwipeProgressBar;->drawCircle(Landroid/graphics/Canvas;FFIF)V
  347. .line 213
  348. .end local v7 # "pct":F
  349. :cond_5
  350. const/high16 v2, 0x42480000 # 50.0f
  351. cmpl-float v2, v22, v2
  352. if-ltz v2, :cond_6
  353. const/high16 v2, 0x42c80000 # 100.0f
  354. cmpg-float v2, v22, v2
  355. if-gtz v2, :cond_6
  356. .line 214
  357. const/high16 v2, 0x42480000 # 50.0f
  358. sub-float v2, v22, v2
  359. const/high16 v3, 0x40000000 # 2.0f
  360. mul-float/2addr v2, v3
  361. const/high16 v3, 0x42c80000 # 100.0f
  362. div-float v7, v2, v3
  363. .line 215
  364. .restart local v7 # "pct":F
  365. int-to-float v4, v9
  366. int-to-float v5, v10
  367. move-object/from16 v0, p0
  368. iget v6, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor4:I
  369. move-object/from16 v2, p0
  370. move-object/from16 v3, p1
  371. invoke-direct/range {v2 .. v7}, Landroid/support/v4/widget/SwipeProgressBar;->drawCircle(Landroid/graphics/Canvas;FFIF)V
  372. .line 217
  373. .end local v7 # "pct":F
  374. :cond_6
  375. const/high16 v2, 0x42960000 # 75.0f
  376. cmpl-float v2, v22, v2
  377. if-ltz v2, :cond_7
  378. const/high16 v2, 0x42c80000 # 100.0f
  379. cmpg-float v2, v22, v2
  380. if-gtz v2, :cond_7
  381. .line 218
  382. const/high16 v2, 0x42960000 # 75.0f
  383. sub-float v2, v22, v2
  384. const/high16 v3, 0x40000000 # 2.0f
  385. mul-float/2addr v2, v3
  386. const/high16 v3, 0x42c80000 # 100.0f
  387. div-float v7, v2, v3
  388. .line 219
  389. .restart local v7 # "pct":F
  390. int-to-float v4, v9
  391. int-to-float v5, v10
  392. move-object/from16 v0, p0
  393. iget v6, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  394. move-object/from16 v2, p0
  395. move-object/from16 v3, p1
  396. invoke-direct/range {v2 .. v7}, Landroid/support/v4/widget/SwipeProgressBar;->drawCircle(Landroid/graphics/Canvas;FFIF)V
  397. .line 221
  398. .end local v7 # "pct":F
  399. :cond_7
  400. move-object/from16 v0, p0
  401. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  402. const/4 v3, 0x0
  403. cmpl-float v2, v2, v3
  404. if-lez v2, :cond_8
  405. if-eqz v11, :cond_8
  406. .line 226
  407. move-object/from16 v0, p1
  408. move/from16 v1, v23
  409. invoke-virtual {v0, v1}, Landroid/graphics/Canvas;->restoreToCount(I)V
  410. .line 227
  411. invoke-virtual/range {p1 .. p1}, Landroid/graphics/Canvas;->save()I
  412. move-result v23
  413. .line 228
  414. move-object/from16 v0, p0
  415. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  416. move-object/from16 v0, p1
  417. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->clipRect(Landroid/graphics/Rect;)Z
  418. .line 229
  419. move-object/from16 v0, p0
  420. move-object/from16 v1, p1
  421. invoke-direct {v0, v1, v9, v10}, Landroid/support/v4/widget/SwipeProgressBar;->drawTrigger(Landroid/graphics/Canvas;II)V
  422. .line 232
  423. :cond_8
  424. move-object/from16 v0, p0
  425. iget-object v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mParent:Landroid/view/View;
  426. move-object/from16 v0, p0
  427. iget-object v3, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  428. iget v3, v3, Landroid/graphics/Rect;->left:I
  429. move-object/from16 v0, p0
  430. iget-object v4, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  431. iget v4, v4, Landroid/graphics/Rect;->top:I
  432. move-object/from16 v0, p0
  433. iget-object v5, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  434. iget v5, v5, Landroid/graphics/Rect;->right:I
  435. move-object/from16 v0, p0
  436. iget-object v6, v0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  437. iget v6, v6, Landroid/graphics/Rect;->bottom:I
  438. invoke-static {v2, v3, v4, v5, v6}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;IIII)V
  439. .line 240
  440. .end local v12 # "elapsed":J
  441. .end local v18 # "iterations":J
  442. .end local v20 # "now":J
  443. .end local v22 # "rawProgress":F
  444. :cond_9
  445. :goto_2
  446. move-object/from16 v0, p1
  447. move/from16 v1, v23
  448. invoke-virtual {v0, v1}, Landroid/graphics/Canvas;->restoreToCount(I)V
  449. goto/16 :goto_0
  450. .line 184
  451. .restart local v12 # "elapsed":J
  452. .restart local v18 # "iterations":J
  453. .restart local v20 # "now":J
  454. .restart local v22 # "rawProgress":F
  455. :cond_a
  456. const/4 v2, 0x0
  457. cmpl-float v2, v22, v2
  458. if-ltz v2, :cond_b
  459. const/high16 v2, 0x41c80000 # 25.0f
  460. cmpg-float v2, v22, v2
  461. if-gez v2, :cond_b
  462. .line 185
  463. move-object/from16 v0, p0
  464. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor4:I
  465. move-object/from16 v0, p1
  466. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->drawColor(I)V
  467. goto/16 :goto_1
  468. .line 186
  469. :cond_b
  470. const/high16 v2, 0x41c80000 # 25.0f
  471. cmpl-float v2, v22, v2
  472. if-ltz v2, :cond_c
  473. const/high16 v2, 0x42480000 # 50.0f
  474. cmpg-float v2, v22, v2
  475. if-gez v2, :cond_c
  476. .line 187
  477. move-object/from16 v0, p0
  478. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  479. move-object/from16 v0, p1
  480. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->drawColor(I)V
  481. goto/16 :goto_1
  482. .line 188
  483. :cond_c
  484. const/high16 v2, 0x42480000 # 50.0f
  485. cmpl-float v2, v22, v2
  486. if-ltz v2, :cond_d
  487. const/high16 v2, 0x42960000 # 75.0f
  488. cmpg-float v2, v22, v2
  489. if-gez v2, :cond_d
  490. .line 189
  491. move-object/from16 v0, p0
  492. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor2:I
  493. move-object/from16 v0, p1
  494. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->drawColor(I)V
  495. goto/16 :goto_1
  496. .line 191
  497. :cond_d
  498. move-object/from16 v0, p0
  499. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mColor3:I
  500. move-object/from16 v0, p1
  501. invoke-virtual {v0, v2}, Landroid/graphics/Canvas;->drawColor(I)V
  502. goto/16 :goto_1
  503. .line 236
  504. .end local v12 # "elapsed":J
  505. .end local v18 # "iterations":J
  506. .end local v20 # "now":J
  507. .end local v22 # "rawProgress":F
  508. :cond_e
  509. move-object/from16 v0, p0
  510. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  511. const/4 v3, 0x0
  512. cmpl-float v2, v2, v3
  513. if-lez v2, :cond_9
  514. move-object/from16 v0, p0
  515. iget v2, v0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  516. float-to-double v2, v2
  517. const-wide/high16 v4, 0x3ff0000000000000L # 1.0
  518. cmpg-double v2, v2, v4
  519. if-gtz v2, :cond_9
  520. .line 237
  521. move-object/from16 v0, p0
  522. move-object/from16 v1, p1
  523. invoke-direct {v0, v1, v9, v10}, Landroid/support/v4/widget/SwipeProgressBar;->drawTrigger(Landroid/graphics/Canvas;II)V
  524. goto :goto_2
  525. .end method
  526. .method isRunning()Z
  527. .locals 4
  528. .prologue
  529. .line 135
  530. iget-boolean v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  531. if-nez v0, :cond_0
  532. iget-wide v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mFinishTime:J
  533. const-wide/16 v2, 0x0
  534. cmp-long v0, v0, v2
  535. if-lez v0, :cond_1
  536. :cond_0
  537. const/4 v0, 0x1
  538. :goto_0
  539. return v0
  540. :cond_1
  541. const/4 v0, 0x0
  542. goto :goto_0
  543. .end method
  544. .method setBounds(IIII)V
  545. .locals 1
  546. .param p1, "left" # I
  547. .param p2, "top" # I
  548. .param p3, "right" # I
  549. .param p4, "bottom" # I
  550. .prologue
  551. .line 271
  552. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  553. iput p1, v0, Landroid/graphics/Rect;->left:I
  554. .line 272
  555. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  556. iput p2, v0, Landroid/graphics/Rect;->top:I
  557. .line 273
  558. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  559. iput p3, v0, Landroid/graphics/Rect;->right:I
  560. .line 274
  561. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  562. iput p4, v0, Landroid/graphics/Rect;->bottom:I
  563. .line 275
  564. return-void
  565. .end method
  566. .method setColorScheme(IIII)V
  567. .locals 0
  568. .param p1, "color1" # I
  569. .param p2, "color2" # I
  570. .param p3, "color3" # I
  571. .param p4, "color4" # I
  572. .prologue
  573. .line 89
  574. iput p1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor1:I
  575. .line 90
  576. iput p2, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor2:I
  577. .line 91
  578. iput p3, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor3:I
  579. .line 92
  580. iput p4, p0, Landroid/support/v4/widget/SwipeProgressBar;->mColor4:I
  581. .line 93
  582. return-void
  583. .end method
  584. .method setTriggerPercentage(F)V
  585. .locals 5
  586. .param p1, "triggerPercentage" # F
  587. .prologue
  588. .line 101
  589. iput p1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  590. .line 102
  591. const-wide/16 v0, 0x0
  592. iput-wide v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mStartTime:J
  593. .line 103
  594. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mParent:Landroid/view/View;
  595. iget-object v1, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  596. iget v1, v1, Landroid/graphics/Rect;->left:I
  597. iget-object v2, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  598. iget v2, v2, Landroid/graphics/Rect;->top:I
  599. iget-object v3, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  600. iget v3, v3, Landroid/graphics/Rect;->right:I
  601. iget-object v4, p0, Landroid/support/v4/widget/SwipeProgressBar;->mBounds:Landroid/graphics/Rect;
  602. iget v4, v4, Landroid/graphics/Rect;->bottom:I
  603. invoke-static {v0, v1, v2, v3, v4}, Landroid/support/v4/view/ViewCompat;->postInvalidateOnAnimation(Landroid/view/View;IIII)V
  604. .line 105
  605. return-void
  606. .end method
  607. .method start()V
  608. .locals 2
  609. .prologue
  610. .line 111
  611. iget-boolean v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  612. if-nez v0, :cond_0
  613. .line 112
  614. const/4 v0, 0x0
  615. iput v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  616. .line 113
  617. invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J
  618. move-result-wide v0
  619. iput-wide v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mStartTime:J
  620. .line 114
  621. const/4 v0, 0x1
  622. iput-boolean v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  623. .line 115
  624. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mParent:Landroid/view/View;
  625. invoke-virtual {v0}, Landroid/view/View;->postInvalidate()V
  626. .line 117
  627. :cond_0
  628. return-void
  629. .end method
  630. .method stop()V
  631. .locals 2
  632. .prologue
  633. .line 123
  634. iget-boolean v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  635. if-eqz v0, :cond_0
  636. .line 124
  637. const/4 v0, 0x0
  638. iput v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mTriggerPercentage:F
  639. .line 125
  640. invoke-static {}, Landroid/view/animation/AnimationUtils;->currentAnimationTimeMillis()J
  641. move-result-wide v0
  642. iput-wide v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mFinishTime:J
  643. .line 126
  644. const/4 v0, 0x0
  645. iput-boolean v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mRunning:Z
  646. .line 127
  647. iget-object v0, p0, Landroid/support/v4/widget/SwipeProgressBar;->mParent:Landroid/view/View;
  648. invoke-virtual {v0}, Landroid/view/View;->postInvalidate()V
  649. .line 129
  650. :cond_0
  651. return-void
  652. .end method