-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathScroller使用分析 - 安诺爱思考 - CSDN博客.html
1197 lines (914 loc) · 93.9 KB
/
Scroller使用分析 - 安诺爱思考 - CSDN博客.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!-- saved from url=(0053)http://blog.csdn.net/a910626/article/details/51548840 -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/hm.js.下载"></script><script type="text/javascript" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/tingyun-rum.js.下载"></script>
<link rel="canonical" href="http://blog.csdn.net/a910626/article/details/51548840">
<meta http-equiv="Cache-Control" content="no-siteapp"><link rel="alternate" media="handheld" href="http://blog.csdn.net/a910626/article/details/51548840#">
<meta name="shenma-site-verification" content="5a59773ab8077d4a62bf469ab966a63b_1497598848">
<title>Scroller使用分析 - 安诺爱思考
- CSDN博客</title>
<meta name="description" content="Scroller使用分析">
<meta name="keywords" content="">
<script src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/blog_static_head.min.js.下载" type="text/javascript"></script>
<!--new top-->
<!--new top-->
<!-- ad begin -->
<!-- ad end-->
<link rel="Stylesheet" type="text/css" href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/style.css">
<link id="RSSLink" title="RSS" type="application/rss+xml" rel="alternate" href="http://blog.csdn.net/a910626/rss/list">
<link rel="shortcut icon" href="http://c.csdnimg.cn/public/favicon.ico">
<link type="text/css" rel="stylesheet" href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/default.css">
<link href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/csdn_public_blog_detail.min.css" type="text/css" rel="stylesheet">
<link rel="stylesheet" href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/csdn_blog_detail.min.css">
<!-- 请置于所有广告位代码之前 -->
<script src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/ds.js.下载"></script>
<script src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/share.js.下载"></script><script src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/wxLogin.js.下载"></script><link href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/bdsstyle.css" rel="stylesheet" type="text/css"><link type="text/css" rel="stylesheet" href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/style(1).css"><link rel="stylesheet" type="text/css" href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/style(2).css"><script src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/logger.js.下载"></script><style type="text/css">.MathJax_Hover_Frame {border-radius: .25em; -webkit-border-radius: .25em; -moz-border-radius: .25em; -khtml-border-radius: .25em; box-shadow: 0px 0px 15px #83A; -webkit-box-shadow: 0px 0px 15px #83A; -moz-box-shadow: 0px 0px 15px #83A; -khtml-box-shadow: 0px 0px 15px #83A; border: 1px solid #A6D ! important; display: inline-block; position: absolute}
.MathJax_Hover_Arrow {position: absolute; width: 15px; height: 11px; cursor: pointer}
</style><style type="text/css">#MathJax_About {position: fixed; left: 50%; width: auto; text-align: center; border: 3px outset; padding: 1em 2em; background-color: #DDDDDD; color: black; cursor: default; font-family: message-box; font-size: 120%; font-style: normal; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; border-radius: 15px; -webkit-border-radius: 15px; -moz-border-radius: 15px; -khtml-border-radius: 15px; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_Menu {position: absolute; background-color: white; color: black; width: auto; padding: 2px; border: 1px solid #CCCCCC; margin: 0; cursor: default; font: menu; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; z-index: 201; box-shadow: 0px 10px 20px #808080; -webkit-box-shadow: 0px 10px 20px #808080; -moz-box-shadow: 0px 10px 20px #808080; -khtml-box-shadow: 0px 10px 20px #808080; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
.MathJax_MenuItem {padding: 2px 2em; background: transparent}
.MathJax_MenuArrow {position: absolute; right: .5em; color: #666666}
.MathJax_MenuActive .MathJax_MenuArrow {color: white}
.MathJax_MenuArrow.RTL {left: .5em; right: auto}
.MathJax_MenuCheck {position: absolute; left: .7em}
.MathJax_MenuCheck.RTL {right: .7em; left: auto}
.MathJax_MenuRadioCheck {position: absolute; left: 1em}
.MathJax_MenuRadioCheck.RTL {right: 1em; left: auto}
.MathJax_MenuLabel {padding: 2px 2em 4px 1.33em; font-style: italic}
.MathJax_MenuRule {border-top: 1px solid #CCCCCC; margin: 4px 1px 0px}
.MathJax_MenuDisabled {color: GrayText}
.MathJax_MenuActive {background-color: Highlight; color: HighlightText}
.MathJax_Menu_Close {position: absolute; width: 31px; height: 31px; top: -15px; left: -15px}
</style><style type="text/css">#MathJax_Zoom {position: absolute; background-color: #F0F0F0; overflow: auto; display: block; z-index: 301; padding: .5em; border: 1px solid black; margin: 0; font-weight: normal; font-style: normal; text-align: left; text-indent: 0; text-transform: none; line-height: normal; letter-spacing: normal; word-spacing: normal; word-wrap: normal; white-space: nowrap; float: none; box-shadow: 5px 5px 15px #AAAAAA; -webkit-box-shadow: 5px 5px 15px #AAAAAA; -moz-box-shadow: 5px 5px 15px #AAAAAA; -khtml-box-shadow: 5px 5px 15px #AAAAAA; filter: progid:DXImageTransform.Microsoft.dropshadow(OffX=2, OffY=2, Color='gray', Positive='true')}
#MathJax_ZoomOverlay {position: absolute; left: 0; top: 0; z-index: 300; display: inline-block; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
#MathJax_ZoomFrame {position: relative; display: inline-block; height: 0; width: 0}
#MathJax_ZoomEventTrap {position: absolute; left: 0; top: 0; z-index: 302; display: inline-block; border: 0; padding: 0; margin: 0; background-color: white; opacity: 0; filter: alpha(opacity=0)}
</style><style type="text/css">.MathJax_Preview {color: #888}
#MathJax_Message {position: fixed; left: 1em; bottom: 1.5em; background-color: #E6E6E6; border: 1px solid #959595; margin: 0px; padding: 2px 8px; z-index: 102; color: black; font-size: 80%; width: auto; white-space: nowrap}
#MathJax_MSIE_Frame {position: absolute; top: 0; left: 0; width: 0px; z-index: 101; border: 0px; margin: 0px; padding: 0px}
.MathJax_Error {color: #CC0000; font-style: italic}
</style><link rel="stylesheet" href="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/share_style0_16.css"></head>
<body><div id="MathJax_Message" style="display: none;"></div><iframe frameborder="0" style="display: none;" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/saved_resource.html"></iframe><div class="csdn-toolbar csdn-toolbar-skin-black "> <div class="container row center-block "> <div class="col-md-3 pull-left logo clearfix"><a href="http://www.csdn.net/?ref=toolbar" title="CSDN首页" target="_blank" class="icon"></a><a title="频道首页" href="http://blog.csdn.net/?ref=toolbar_logo" class="img blog-icon"></a></div> <div class="pull-right login-wrap unlogin"> <ul class="btns"> <li class="loginlink"><a href="https://passport.csdn.net/account/login?ref=toolbar" target="_top">登录 </a>|<a target="_top" href="http://passport.csdn.net/account/mobileregister?ref=toolbar&action=mobileRegister"> 注册</a></li> <li class="search"> <div class="icon on-search-icon"> <div class="wrap"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <form action="http://so.csdn.net/search" id="toolbar_search" method="get" target="_blank"> <input type="hidden" value="toolbar" name="ref" accesskey="2"> <div class="border"> <input placeholder="搜索" type="text" value="" name="q" accesskey="2"><span class="icon-enter-sm"></span> </div> </form> </div> </div> </li> <li class="favor"> <div class="icon on-favor-icon"> <div class="wrap"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div style="display:none;" class="favor-success"><span class="msg">收藏成功</span> <div class="btns"><span class="btn btn-primary ok">确定</span></div> </div> <div style="display:none;" class="favor-failed"><span class="icon-danger-lg"></span><span class="msg">收藏失败,请重新收藏</span> <div class="btns"><span class="btn btn-primary ok">确定</span></div> </div> <form role="form" class="form-horizontal favor-form"> <div class="form-group"> <div class="clearfix"> <label for="input-title" class="col-sm-2 control-label"><span class="red_txt">*</span>标题</label> <div class="col-sm-10"> <input id="inputTitle" type="text" placeholder="" class="title form-control"> </div> </div> <div class="alert alert-danger"><strong></strong>标题不能为空</div> </div> <div class="form-group" style="display:none;"> <label for="input-url" class="col-sm-2 control-label">网址</label> <div class="col-sm-10"> <input id="input-url" type="text" placeholder="" class="url form-control"> </div> </div> <div class="form-group"> <label for="input-tag" class="col-sm-2 tag control-label">标签</label> <div class="col-sm-10"> <input id="input-tag" type="text" class="form-control tag"> </div> </div> <div class="form-group"> <label for="input-description" class="description col-sm-2 control-label">位置</label> <div class="col-sm-10"> <div class="my_lib_box"> 个人主页 - <a href="http://my.csdn.net/" target="_blank">我的知识</a> </div> <div class="checkbox"> <div class="pull-left"> <label> <input type="checkbox" name="share" class="save_lib_map" checked="checked">同时保存至: </label> </div> <div class="pull-left"> <div class="dropdown"> <button id="toolbar_sele_map" type="button"> 选择知识图谱 <i class="fa fa-chevron-down"></i> </button> <div class="top_arr"></div> <div class="outside"> <ul class="dropdown-menu" id="toolbar_Design_knowledge"><li>选择知识图谱</li></ul> </div> </div> </div> <div class="pull-left new_txt"> <a href="http://lib.csdn.net/my/create/structure" target="_blank">新建?</a> </div> </div> </div> </div> <div class="form-group"> <div class="col-sm-offset-2 col-sm-10 ft"> <div class="col-sm-4 pull-left" style="display:none"> <div class="checkbox"> <label> <input type="checkbox" name="share" checked="checked" class="share">公开 </label> </div> </div> <div class="col-sm-8 pull-right favor-btns"> <button type="button" class="cancel btn btn-default">取消</button> <button type="submit" class="submit btn btn-primary">收藏</button> </div> </div> </div> </form> </div> </div> </li> <li class="notify"> <div style="display:none" class="number"></div> <div style="display:none" class="icon-hasnotes-sm"></div> <div id="header_notice_num"></div> <div class="icon on-notify-icon"> <div class="wrap"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div id="note1" class="csdn_note"> <div class="box"></div> <iframe src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/saved_resource(1).html" frameborder="0" allowtransparency="true" style="z-index:-1;position:absolute;top:0;left:0;width:100%;height:100%;background:transparent"></iframe></div> </div> </div> </li> <li class="ugc"> <div class="icon on-ugc-icon"> <div class="wrap clearfix"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <dl> <dt><a href="http://geek.csdn.net/news/expert?ref=toolbar" target="_blank" class="p-news clearfix" style="display:none;"><em class="icon"></em><span>分享资讯</span></a></dt> <dt style="border: none;"><a href="http://u.download.csdn.net/upload?ref=toolbar" target="_blank" class="p-doc clearfix"><em class="icon"></em><span>传PPT/文档</span></a></dt> <dt><a href="http://bbs.csdn.net/topics/new?ref=toolbar" target="_blank" class="p-ask clearfix"><em class="icon"></em><span>提问题</span></a></dt> <dt><a href="http://write.blog.csdn.net/postedit?ref=toolbar" target="_blank" class="p-blog clearfix"><em class="icon"></em><span>写博客</span></a></dt> <dt><a href="http://u.download.csdn.net/upload?ref=toolbar" target="_blank" class="p-src clearfix"><em class="icon"></em><span>传资源</span></a></dt> <dt><a href="https://code.csdn.net/projects/new?ref=toolbar" target="_blank" class="c-obj clearfix"><em class="icon"></em><span>创建项目</span></a></dt> <dt><a href="https://code.csdn.net/snippets/new?ref=toolbar" target="_blank" class="c-code clearfix"><em class="icon"></em><span>创建代码片</span></a></dt> </dl> </div> </div> </li> <li class="profile"> <div class="icon on-profile-icon"><img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/100x100.jpg" class="curr-icon-img"> <div class="wrap clearfix"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div class="bd"> <dl class="clearfix"> <dt class="pull-left img"><a target="_blank" href="http://my.csdn.net/?ref=toolbar" class="avatar"><img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/100x100.jpg"></a></dt> <dd class="info" style="border: none;"><a target="_blank" href="http://my.csdn.net/?ref=toolbar" class="nickname"></a><a class="set-nick" href="https://passport.csdn.net/account/profile">设置昵称<span class="write-icon"></span></a><span class="dec"><a class="fill-dec" href="http://my.csdn.net/" target="_blank">编辑自我介绍,让更多人了解你<span class="write-icon"></span></a></span></dd> </dl> </div> <div class="ft clearfix"><a target="_blank" href="http://my.csdn.net/my/account/changepwd?ref=toolbar" class="pull-left"><span class="icon-cog"></span>帐号设置</a><a href="https://passport.csdn.net/account/logout?ref=toolbar" target="_top" class="pull-left" style="margin-left:132px; width:18px; height:27px; white-space:nowrap; overflow:hidden;"><span class="icon-signout"></span><span class="out">退出</span></a></div> </div> </div> </li> <li class="apps"> <div id="chasnew123" class="hasnew" style="display: none;"></div> <div id="cappsarea123" class="icon on-apps-icon"> <div class="wrap clearfix"> <div class="curr-icon-wrap"> <div class="curr-icon"></div> </div> <div class="detail"> <dl> <dt> <h5>社区</h5> </dt> <dd> <a href="http://blog.csdn.net/?ref=toolbar" target="_blank">博客</a></dd> <dd> <a href="http://bbs.csdn.net/?ref=toolbar" target="_blank">论坛</a></dd> <dd> <a href="http://download.csdn.net/?ref=toolbar" target="_blank">下载</a></dd> <dd> <a href="http://lib.csdn.net/?ref=toolbar" target="_blank">知识库</a></dd> <dd><a href="http://ask.csdn.net/?ref=toolbar" target="_blank">技术问答</a></dd> <dd><a href="http://geek.csdn.net/?ref=toolbar" target="_blank">极客头条</a></dd> <dd style="display:none"> <a href="http://hero.csdn.net/?ref=toolbar" target="_blank">英雄会</a></dd> </dl> </div> <div class="detail"> <dl> <dt> <h5>服务</h5> </dt> <dd style="display:none"> <a href="http://job.csdn.net/?ref=toolbar" target="_blank">JOB<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/new.gif" style="display: none; margin-top: -26px; width: 23px;"></a></dd> <dd> <a href="http://edu.csdn.net/?ref=toolbar" target="_blank">学院<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/new.gif" style="display: none; margin-top: -26px; width: 23px;"></a></dd> <dd> <a href="https://code.csdn.net/?ref=toolbar" target="_blank">CODE</a></dd> <dd> <a href="http://huiyi.csdn.net/?ref=toolbar" target="_blank">活动</a></dd> <dd> <a href="http://www.csto.com/?ref=toolbar" target="_blank">CSTO</a></dd> <dd> <a href="http://mall.csdn.net/?ref=toolbar" target="_blank">C币兑换<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/new.gif" style="display: none; margin-top: -26px; width: 23px;"></a></dd> </dl> </div> <div class="detail last"> <dl> <dt> <h5>俱乐部</h5> </dt> <dd> <a href="http://cto.csdn.net/?ref=toolbar" target="_blank">CTO俱乐部</a></dd> <dd> <a href="http://student.csdn.net/?ref=toolbar" target="_blank">高校俱乐部</a></dd> </dl> </div> </div> </div> </li> </ul> </div> </div> </div>
<!-- 广告位开始 -->
<!-- 广告位结束 -->
<!--new top-->
<script id="toolbar-tpl-scriptId" fixed="true" prod="blog" skin="black" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/html.js.下载" type="text/javascript"></script>
<!--new top-->
<div id="container">
<div id="header">
<div class="header">
<div id="blog_title">
<h2>
<a href="http://blog.csdn.net/a910626">安诺爱思考</a></h2>
<h3>talk is cheap, show me the code。!!!要重实践。找准定位和方向,不急不躁,持续投入。顺势而为。</h3>
<div class="clear">
</div>
</div>
<div class="clear">
</div>
</div>
</div>
<div id="navigator">
<div class="navigator_bg">
</div>
<div class="navigator">
<ul>
<li id="btnContents"><a href="http://blog.csdn.net/a910626?viewmode=contents"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_mulu'])">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/ico_list.gif">目录视图</span></a></li>
<li id="btnView"><a href="http://blog.csdn.net/a910626?viewmode=list"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_zhaiyao'])">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/ico_summary.gif">摘要视图</span></a></li>
<li id="btnRss"><a href="http://blog.csdn.net/a910626/rss/list"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_RSS'])">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/ico_rss.gif">订阅</span></a></li>
</ul>
</div>
</div>
<script type="text/javascript">
var username = "a910626";
var _blogger = username;
var blog_address = "http://blog.csdn.net/a910626";
var static_host = "http://static.blog.csdn.net";
var currentUserName = "";
</script>
<div id="body">
<div id="main">
<div class="main">
<div class="ad_class">
<div class="notice tracking-ad" data-mod="popu_3">
<a href="http://blog.csdn.net/broadview2006/article/details/75423492" target="_blank">
<font color="red"><strong>评论送书 | 云原生、Docker、Web算法 </strong></font></a>
<a href="http://blog.csdn.net/blogdevteam/article/details/74550215" target="_blank">
<font color="blue"><strong>征文 | 你会为 AI 转型么?</strong></font></a>
<a href="http://blog.csdn.net/soledadzz/article/details/75312484" target="_blank">
<font color="red"><strong>福利 | 免费参加 2017 OpenStack Days China</strong></font></a>
</div> </div>
<script type="text/javascript" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/category.js.下载"></script>
<script type="text/ecmascript">
window.quickReplyflag = true;
var isBole = false;
var fasrc="http://my.csdn.net/my/favorite/miniadd?t=Scroller%e4%bd%bf%e7%94%a8%e5%88%86%e6%9e%90&u=http://blog.csdn.net/a910626/article/details/51548840"
</script>
<div id="article_details" class="details">
<div class="article_title">
<span class="ico ico_type_Original"></span>
<h1>
<span class="link_title"><a href="http://blog.csdn.net/a910626/article/details/51548840">
Scroller使用分析
</a>
</span>
</h1>
</div>
<div class="article_manage clearfix">
<div class="article_r">
<span class="link_postdate">2016-05-31 20:27</span>
<span class="link_view" title="阅读次数">464人阅读</span>
<span class="link_comments" title="评论次数"> <a href="http://blog.csdn.net/a910626/article/details/51548840#comments" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_pinglun'])">评论</a>(0)</span>
<span class="link_collect tracking-ad" data-mod="popu_171"> <a href="javascript:void(0);" onclick="javascript:collectArticle('Scroller%e4%bd%bf%e7%94%a8%e5%88%86%e6%9e%90','51548840');return false;" title="收藏" target="_blank">收藏</a></span>
<span class="link_report"> <a href="http://blog.csdn.net/a910626/article/details/51548840#report" onclick="javascript:report(51548840,2);return false;" title="举报">举报</a></span>
</div>
</div> <style type="text/css">
.embody{
padding:10px 10px 10px;
margin:0 -20px;
border-bottom:solid 1px #ededed;
}
.embody_b{
margin:0 ;
padding:10px 0;
}
.embody .embody_t,.embody .embody_c{
display: inline-block;
margin-right:10px;
}
.embody_t{
font-size: 12px;
color:#999;
}
.embody_c{
font-size: 12px;
}
.embody_c img,.embody_c em{
display: inline-block;
vertical-align: middle;
}
.embody_c img{
width:30px;
height:30px;
}
.embody_c em{
margin: 0 20px 0 10px;
color:#333;
font-style: normal;
}
</style>
<script type="text/javascript">
$(function () {
try
{
var lib = eval("("+$("#lib").attr("value")+")");
var html = "";
if (lib.err == 0) {
$.each(lib.data, function (i) {
var obj = lib.data[i];
//html += '<img src="' + obj.logo + '"/>' + obj.name + " ";
html += ' <a href="' + obj.url + '" target="_blank">';
html += ' <img src="' + obj.logo + '">';
html += ' <em><b>' + obj.name + '</b></em>';
html += ' </a>';
});
if (html != "") {
setTimeout(function () {
$("#lib").html(html);
$("#embody").show();
}, 100);
}
}
} catch (err)
{ }
});
</script>
<div class="category clearfix">
<div class="category_l">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/category_icon.jpg">
<span>分类:</span>
</div>
<div class="category_r">
<label onclick="GetCategoryArticles('1256032','a910626','top','51548840');">
<span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_fenlei']);">【android提高】<em>(116)</em></span>
<img class="arrow-down" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/arrow_triangle _down.jpg" style="display:inline;">
<img class="arrow-up" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/arrow_triangle_up.jpg" style="display:none;">
<div class="subItem">
<div class="subItem_t"><a href="http://blog.csdn.net/a910626/article/category/1256032" target="_blank">作者同类文章</a><i class="J_close">X</i></div>
<ul class="subItem_l" id="top_1256032">
</ul>
</div>
</label>
</div>
</div>
<div class="bog_copyright">
<p class="copyright_p">版权声明:本文为博主原创文章,未经博主允许不得转载。</p>
</div>
<div style="clear:both"></div><div style="border:solid 1px #ccc; background:#eee; float:left; min-width:200px;padding:4px 10px;"><p style="text-align:right;margin:0;"><span style="float:left;">目录<a href="http://blog.csdn.net/a910626/article/details/51548840#" title="系统根据文章中H1到H6标签自动生成文章目录">(?)</a></span><a href="http://blog.csdn.net/a910626/article/details/51548840#" onclick="javascript:return openct(this);" title="展开">[+]</a></p><ol style="display:none;margin-left:14px;padding-left:14px;line-height:160%;"><li><a href="http://blog.csdn.net/a910626/article/details/51548840#t0">一Scroller是什么</a></li><li><a href="http://blog.csdn.net/a910626/article/details/51548840#t1">二这个知识应用场景是可以解决什么问题</a></li><li><a href="http://blog.csdn.net/a910626/article/details/51548840#t2">三该类的常见API</a></li><li><a href="http://blog.csdn.net/a910626/article/details/51548840#t3">四常规的用法是什么</a></li><li><a href="http://blog.csdn.net/a910626/article/details/51548840#t4">五使用时的难点在哪里</a></li><li><a href="http://blog.csdn.net/a910626/article/details/51548840#t5">六一个案例来自android群英传</a></li></ol></div><div style="clear:both"></div><div id="article_content" class="article_content tracking-ad" data-mod="popu_307" data-dsm="post">
<div class="markdown_views"><h2 id="一scroller是什么"><a name="t0" target="_blank"></a>一.Scroller是什么?</h2>
<ul>
<li><p><a href="http://lib.csdn.net/base/android" class="replace_word" title="Android知识库" target="_blank" style="color:#df3434; font-weight:bold;">Android</a>里Scroller类是为了实现View平滑滚动的一个Helper类。通常在自定义的View时使用,在View中定义一个私有成员mScroller = new Scroller(context)。设置mScroller滚动的位置时,并不会导致View的滚动,通常是用mScroller记录/计算View滚动的位置,再重写View的computeScroll(),完成实际的滚动。 </p></li>
<li><p>Scroller只是个计算器,提供插值计算,让滚动过程具有动画属性,但它并不是UI,也不是辅助UI滑动,反而是单纯地为滑动提供计算。</p></li>
<li><p>无论从构造方法还是其他方法,以及Scroller的属性可知,其并不会持有View,辅助ViewGroup滑动。</p></li>
<li><p>Scroller只是提供计算,那谁来调用computeScroll使得ViewGroup滑动</p></li>
<li><p>computeScroll也不是来让ViewGroup滑动的,真正让ViewGroup滑动的是scrollTo,scrollBy。computeScroll的作用是计算ViewGroup如何滑动。而computeScroll是通过draw来调用的。</p></li>
<li><p>computeScroll和Scroller都是计算,两者有啥关系?没有直接的关系。computeScroll和Scroller要是飞得拉关系的话,那就是computeScroll可以参考Scroller计算结果来影响scrollTo,scrollBy,从而使得滑动发生改变。也就是Scroller不会调用computeScroll,反而是computeScroll调用Scroller。</p></li>
<li><p>滑动时连续的,如何让Scroller的计算也是连续的?这个就问到了什么时候调用computeScroll了,如上所说computeScroll调用Scroller,只要computeScroll调用连续,Scroller也会连续,实质上computeScroll的连续性又invalidate方法控制,scrollTo,scrollBy都会调用invalidate,而invalidate回去触发draw,从而computeScroll被连续调用,综上,Scroller也会被连续调用,除非invalidate停止调用。</p></li>
<li><p>computeScroll如何和Scroller的调用过程保持一致?computeScroll参考Scroller影响scrollTo,scrollBy,实质上,为了不重复影响scrollTo,scrollBy,那么Scroller必须终止计算currX,currY。要知道计算有没有终止,需要通过mScroller.computeScrollOffset()</p></li>
</ul>
<h2 id="二这个知识应用场景是可以解决什么问题"><a name="t1" target="_blank"></a>二.这个知识应用场景是?可以解决什么问题?</h2>
<p> 我们在需求实现时,经常遇到view滑动的情况,而scrollTo、scrollBy方法都可以实现view的滑动,但是效果是瞬间完成的,用户体验并不好,我们可以使用scroller或者smoothScrollto(内部也是scroller实现的)来实现平滑移动的效果。常见于自定义view中。</p>
<h2 id="三该类的常见api"><a name="t2" target="_blank"></a>三.该类的常见API?</h2>
<pre class="prettyprint" name="code"><code class="hljs cs has-numbering">mScroller.getCurrX() <span class="hljs-comment">//获取mScroller当前水平滚动的位置 </span>
mScroller.getCurrY() <span class="hljs-comment">//获取mScroller当前竖直滚动的位置 </span>
mScroller.getFinalX() <span class="hljs-comment">//获取mScroller最终停止的水平位置 </span>
mScroller.getFinalY() <span class="hljs-comment">//获取mScroller最终停止的竖直位置 </span>
mScroller.setFinalX(<span class="hljs-keyword">int</span> newX) <span class="hljs-comment">//设置mScroller最终停留的水平位置,没有动画效果,直接跳到目标位置 </span>
mScroller.setFinalY(<span class="hljs-keyword">int</span> newY) <span class="hljs-comment">//设置mScroller最终停留的竖直位置,没有动画效果,直接跳到目标位置 </span>
<span class="hljs-comment">//滚动,startX, startY为开始滚动的位置,dx,dy为滚动的偏移量, duration为完成滚动的时间 </span>
mScroller.startScroll(<span class="hljs-keyword">int</span> startX, <span class="hljs-keyword">int</span> startY, <span class="hljs-keyword">int</span> dx, <span class="hljs-keyword">int</span> dy) <span class="hljs-comment">//使用默认完成时间250ms </span>
mScroller.startScroll(<span class="hljs-keyword">int</span> startX, <span class="hljs-keyword">int</span> startY, <span class="hljs-keyword">int</span> dx, <span class="hljs-keyword">int</span> dy, <span class="hljs-keyword">int</span> duration)
mScroller.computeScrollOffset() <span class="hljs-comment">//返回值为boolean,true说明滚动尚未完成,false说明滚动已经完成。这是一个很重要的方法,通常放在View.computeScroll()中,用来判断是否滚动是否结束。 </span></code><ul class="pre-numbering" style="opacity: 0;"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li><li>8</li><li>9</li><li>10</li><li>11</li><li>12</li></ul><div class="save_code tracking-ad" data-mod="popu_249" style="display: none;"><a href="javascript:;" target="_blank"><img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/save_snippets.png"></a></div><ul class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li><li>8</li><li>9</li><li>10</li><li>11</li><li>12</li></ul></pre>
<h2 id="四常规的用法是什么"><a name="t3" target="_blank"></a>四.常规的用法是什么?</h2>
<p> Scroller的基本用法其实还是比较简单的,主要可以分为以下几个步骤: <br>
1. 创建Scroller的实例 <br>
2. 调用startScroll()方法来初始化滚动数据并刷新界面 <br>
3. 重写computeScroll()方法,并在其内部完成平滑滚动的逻辑 </p>
<h2 id="五使用时的难点在哪里"><a name="t4" target="_blank"></a>五.使用时的难点在哪里?</h2>
<p> 使用的难点在于startScroll的参数含义,然后根据参数含义给出合适的值,因为这个过程涉及<a href="http://lib.csdn.net/base/android" class="replace_word" title="Android知识库" target="_blank" style="color:#df3434; font-weight:bold;">android</a>中坐标计算,所以较为复杂。</p>
<pre class="prettyprint" name="code"><code class="hljs cs has-numbering"> <span class="hljs-comment">// void android.widget.Scroller.startScroll(int startX, int startY, int dx, int dy, int duration)</span>
<span class="hljs-comment">// 第一个参数是起始移动的x坐标值,</span>
<span class="hljs-comment">// 第二个是起始移动的y坐标值,</span>
<span class="hljs-comment">// 第三个第四个参数都是移到某点的坐标值-初始的坐标值,即移动的距离值</span>
<span class="hljs-comment">// 而duration 当然就是执行移动的时间。</span>
</code><ul class="pre-numbering" style="opacity: 0;"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li></ul><div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/save_snippets.png"></a></div><ul class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li></ul></pre>
<h2 id="六一个案例来自android群英传"><a name="t5" target="_blank"></a>六.一个案例:来自《android群英传》</h2>
<pre class="prettyprint" name="code"><code class="hljs java has-numbering"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">ScrollerDragView</span> <span class="hljs-keyword">extends</span> <span class="hljs-title">View</span> {</span>
<span class="hljs-keyword">private</span> Scroller mScroller;
<span class="hljs-keyword">private</span> <span class="hljs-keyword">int</span> mLastX;
<span class="hljs-keyword">private</span> <span class="hljs-keyword">int</span> mLastY;
<span class="hljs-keyword">public</span> <span class="hljs-title">ScrollerDragView</span>(Context context) {
<span class="hljs-keyword">super</span>(context);
initView(context);
}
<span class="hljs-keyword">public</span> <span class="hljs-title">ScrollerDragView</span>(Context context, AttributeSet attrs) {
<span class="hljs-keyword">super</span>(context, attrs);
initView(context);
}
<span class="hljs-keyword">private</span> <span class="hljs-keyword">void</span> <span class="hljs-title">initView</span>(Context context) {
setBackgroundColor(Color.BLUE);
mScroller = <span class="hljs-keyword">new</span> Scroller(context);
}
<span class="hljs-annotation">@Override</span>
<span class="hljs-keyword">public</span> <span class="hljs-keyword">boolean</span> <span class="hljs-title">onTouchEvent</span>(MotionEvent event) {
<span class="hljs-keyword">int</span> x = (<span class="hljs-keyword">int</span>) event.getX();
<span class="hljs-keyword">int</span> y = (<span class="hljs-keyword">int</span>) event.getY();
<span class="hljs-keyword">switch</span> (event.getAction()) {
<span class="hljs-keyword">case</span> MotionEvent.ACTION_DOWN:
mLastX = (<span class="hljs-keyword">int</span>) event.getX();
mLastY = (<span class="hljs-keyword">int</span>) event.getY();
<span class="hljs-keyword">break</span>;
<span class="hljs-keyword">case</span> MotionEvent.ACTION_MOVE:
<span class="hljs-keyword">int</span> offsetX = x - mLastX;
<span class="hljs-keyword">int</span> offsetY = y - mLastY;
<span class="hljs-comment">// 貌似使用了getParent,就不再需要重置x,y的坐标了</span>
((View)getParent()).scrollBy(-offsetX, -offsetY);
<span class="hljs-keyword">break</span>;
<span class="hljs-keyword">case</span> MotionEvent.ACTION_UP:
View viewGroup = (View) getParent();
mScroller.startScroll(viewGroup.getScrollX(),
viewGroup.getScrollY(),
-viewGroup.getScrollX(),
-viewGroup.getScrollY());
invalidate();
<span class="hljs-keyword">break</span>;
}
<span class="hljs-keyword">return</span> <span class="hljs-keyword">true</span>;
}
<span class="hljs-javadoc">/**
* 这里不需要特别的理解,只要使用Scroller,这里都是一样的
*/</span>
<span class="hljs-annotation">@Override</span>
<span class="hljs-keyword">public</span> <span class="hljs-keyword">void</span> <span class="hljs-title">computeScroll</span>() {
<span class="hljs-keyword">super</span>.computeScroll();
<span class="hljs-keyword">if</span> (mScroller.computeScrollOffset()) {
((View)getParent()).scrollTo(mScroller.getCurrX(), mScroller.getCurrY());
invalidate();
}
}
}
</code><ul class="pre-numbering" style="opacity: 0;"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li><li>8</li><li>9</li><li>10</li><li>11</li><li>12</li><li>13</li><li>14</li><li>15</li><li>16</li><li>17</li><li>18</li><li>19</li><li>20</li><li>21</li><li>22</li><li>23</li><li>24</li><li>25</li><li>26</li><li>27</li><li>28</li><li>29</li><li>30</li><li>31</li><li>32</li><li>33</li><li>34</li><li>35</li><li>36</li><li>37</li><li>38</li><li>39</li><li>40</li><li>41</li><li>42</li><li>43</li><li>44</li><li>45</li><li>46</li><li>47</li><li>48</li><li>49</li><li>50</li><li>51</li><li>52</li><li>53</li><li>54</li><li>55</li><li>56</li><li>57</li><li>58</li><li>59</li><li>60</li><li>61</li><li>62</li></ul><div class="save_code tracking-ad" data-mod="popu_249"><a href="javascript:;" target="_blank"><img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/save_snippets.png"></a></div><ul class="pre-numbering"><li>1</li><li>2</li><li>3</li><li>4</li><li>5</li><li>6</li><li>7</li><li>8</li><li>9</li><li>10</li><li>11</li><li>12</li><li>13</li><li>14</li><li>15</li><li>16</li><li>17</li><li>18</li><li>19</li><li>20</li><li>21</li><li>22</li><li>23</li><li>24</li><li>25</li><li>26</li><li>27</li><li>28</li><li>29</li><li>30</li><li>31</li><li>32</li><li>33</li><li>34</li><li>35</li><li>36</li><li>37</li><li>38</li><li>39</li><li>40</li><li>41</li><li>42</li><li>43</li><li>44</li><li>45</li><li>46</li><li>47</li><li>48</li><li>49</li><li>50</li><li>51</li><li>52</li><li>53</li><li>54</li><li>55</li><li>56</li><li>57</li><li>58</li><li>59</li><li>60</li><li>61</li><li>62</li></ul></pre></div>
<script type="text/javascript">
$(function () {
$('pre.prettyprint code').each(function () {
var lines = $(this).text().split('\n').length;
var $numbering = $('<ul></ul>').addClass('pre-numbering').hide();
$(this).addClass('has-numbering').parent().append($numbering);
for (i = 1; i <= lines; i++) {
$numbering.append($('<li></li>').text(i));
};
$numbering.fadeIn(1700);
});
});
</script>
</div>
<!-- Baidu Button BEGIN -->
<div class="bdsharebuttonbox tracking-ad bdshare-button-style0-16" style="float: right;" data-mod="popu_172" data-bd-bind="1500533076504">
<a href="http://blog.csdn.net/a910626/article/details/51548840#" class="bds_more" data-cmd="more" style="background-position:0 0 !important; background-image: url(http://bdimg.share.baidu.com/static/api/img/share/icons_0_16.png?v=d754dcc0.png) !important" target="_blank"></a>
<a href="http://blog.csdn.net/a910626/article/details/51548840#" class="bds_qzone" data-cmd="qzone" title="分享到QQ空间" style="background-position:0 -52px !important" target="_blank"></a>
<a href="http://blog.csdn.net/a910626/article/details/51548840#" class="bds_tsina" data-cmd="tsina" title="分享到新浪微博" style="background-position:0 -104px !important" target="_blank"></a>
<a href="http://blog.csdn.net/a910626/article/details/51548840#" class="bds_tqq" data-cmd="tqq" title="分享到腾讯微博" style="background-position:0 -260px !important" target="_blank"></a>
<a href="http://blog.csdn.net/a910626/article/details/51548840#" class="bds_renren" data-cmd="renren" title="分享到人人网" style="background-position:0 -208px !important" target="_blank"></a>
<a href="http://blog.csdn.net/a910626/article/details/51548840#" class="bds_weixin" data-cmd="weixin" title="分享到微信" style="background-position:0 -1612px !important" target="_blank"></a>
</div>
<script>window._bd_share_config = { "common": { "bdSnsKey": {}, "bdText": "", "bdMini": "1", "bdMiniList": false, "bdPic": "", "bdStyle": "0", "bdSize": "16" }, "share": {} }; with (document) 0[(getElementsByTagName('head')[0] || body).appendChild(createElement('script')).src = 'http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion=' + ~(-new Date() / 36e5)];</script>
<!-- Baidu Button END -->
<!--172.16.140.13-->
<!-- Baidu Button BEGIN -->
<script type="text/javascript" id="bdshare_js" data="type=tools&uid=1536434" src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/bds_s_v2.js.下载"></script>
<script type="text/javascript">
document.getElementById("bdshell_js").src = "http://bdimg.share.baidu.com/static/js/shell_v2.js?cdnversion=" + Math.ceil(new Date()/3600000)
</script>
<!-- Baidu Button END -->
<div id="digg" articleid="51548840">
<dl id="btnDigg" class="digg digg_disable" onclick="btndigga();">
<dt>顶</dt>
<dd>0</dd>
</dl>
<dl id="btnBury" class="digg digg_disable" onclick="btnburya();">
<dt>踩</dt>
<dd>0</dd>
</dl>
</div>
<div class="tracking-ad" data-mod="popu_222"><a href="javascript:void(0);" target="_blank"> </a> </div>
<div class="tracking-ad" data-mod="popu_223"> <a href="javascript:void(0);" target="_blank"> </a></div>
<script type="text/javascript">
function btndigga() {
$(".tracking-ad[data-mod='popu_222'] a").click();
}
function btnburya() {
$(".tracking-ad[data-mod='popu_223'] a").click();
}
</script>
<ul class="article_next_prev">
<li class="prev_article"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_shangyipian']);location.href='http://blog.csdn.net/a910626/article/details/51546242';">上一篇</span><a href="http://blog.csdn.net/a910626/article/details/51546242" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_shangyipian'])">【自定义view系列】View的measure过程</a></li>
<li class="next_article"><span onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_xiayipian']);location.href='http://blog.csdn.net/a910626/article/details/51553523';">下一篇</span><a href="http://blog.csdn.net/a910626/article/details/51553523" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_xiayipian'])">实现View滑动的七种方法</a></li>
</ul>
<div style="clear:both; height:10px;"></div>
<div class="similar_article">
<h4></h4>
<div class="similar_c" style="margin:20px 0px 0px 0px">
<div class="similar_c_t">
相关文章推荐
</div>
<div class="similar_wrap tracking-ad" data-mod="popu_36">
<ul class="similar_list fl">
<li>
<em>•</em>
<a href="http://blog.csdn.net/zxg19/article/details/27539713" title="Android Scroller类的详细分析" strategy="BlogCommendFromCsdn" target="_blank">Android Scroller类的详细分析</a>
</li>
<li>
<em>•</em>
<a href="http://mmdev.iteye.com/blog/1806754" title="Android应用程序窗口(Activity)的测量(Measure)、布局(Layout)和绘制(Draw)过程分析" strategy="BlogCommendFromCsdn" target="_blank">Android应用程序窗口(Activity)的测量(Measure)、布局(Layout)和绘制(Draw)过程分析</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/u011494050/article/details/41708765" title="【android】从源码的角度深入分析Scroller" strategy="BlogCommendFromCsdn" target="_blank">【android】从源码的角度深入分析Scroller</a>
</li>
<li>
<em>•</em>
<a href="http://f059074251.iteye.com/blog/1738928" title="Android中滑屏实现----手把手教你如何实现触摸滑屏以及Scroller类详解 " strategy="BlogCommendFromCsdn" target="_blank">Android中滑屏实现----手把手教你如何实现触摸滑屏以及Scroller类详解 </a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/wf_zeng/article/details/9341075" title="Scroller使用分析和总结" strategy="BlogCommendFromCsdn" target="_blank">Scroller使用分析和总结</a>
</li>
</ul>
<ul class="similar_list fr">
<li>
<em>•</em>
<a href="http://blog.csdn.net/gaosini0001/article/details/41701601" title="【安卓】从源码的角度深入分析Scroller" strategy="BlogCommendFromCsdn" target="_blank">【安卓】从源码的角度深入分析Scroller</a>
</li>
<li>
<em>•</em>
<a href="http://f059074251.iteye.com/blog/2200905" title="【Android 应用开发】 自定义组件 宽高适配方法, 手势监听器操作组件, 回调接口维护策略, 绘制方法分析 -- 基于 WheelView 组件分析自定义组件" strategy="BlogCommendFromCsdn" target="_blank">【Android 应用开发】 自定义组件 宽高适配方法, 手势监听器操作组件, 回调接口维护策略, 绘制方法分析 -- 基于 WheelView 组件分析自定义组件</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/fuli911/article/details/73278823" title="android_Scroller 弹性滑动源码分析" strategy="BlogCommendFromCsdn" target="_blank">android_Scroller 弹性滑动源码分析</a>
</li>
<li>
<em>•</em>
<a href="http://chriszeng87.iteye.com/blog/1797891" title="Android横向滚动屏幕特效分析" strategy="BlogCommendFromCsdn" target="_blank">Android横向滚动屏幕特效分析</a>
</li>
<li>
<em>•</em>
<a href="http://blog.csdn.net/scott2017/article/details/51734005" title="关于Scroller的使用以及自己实现一个侧滑菜单" strategy="BlogCommendFromCsdn" target="_blank">关于Scroller的使用以及自己实现一个侧滑菜单</a>
</li>
</ul>
</div>
</div>
</div>
</div>
<div id="suggest">
</div>
<script language="javascript" type="text/javascript">
$(function(){
$.get("/a910626/svc/GetSuggestContent/51548840",function(data){
$("#suggest").html(data);
});
});
</script>
<dl class="blog-ass-articl tracking-ad" id="res-relatived" data-mod="popu_84">
<dt><span>猜你在找</span></dt>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/30" title="C语言及程序设计(讲师:贺利坚)" strategy="undefined" target="_blank">C语言及程序设计(讲师:贺利坚)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/379" title="Python爬虫工程师培养课程全套(讲师:韦玮)" strategy="undefined" target="_blank">Python爬虫工程师培养课程全套(讲师:韦玮)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/468" title="Python全栈开发入门与实战课(讲师:李杰)" strategy="undefined" target="_blank">Python全栈开发入门与实战课(讲师:李杰)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/233" title="2017软考网络规划设计师视频套餐(讲师:任铄)" strategy="undefined" target="_blank">2017软考网络规划设计师视频套餐(讲师:任铄)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/169" title="2017软考软件设计师视频套餐(讲师:任铄)" strategy="undefined" target="_blank">2017软考软件设计师视频套餐(讲师:任铄)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/144" title="2017软考-信息系统项目管理师视频套餐(讲师:任铄)" strategy="undefined" target="_blank">2017软考-信息系统项目管理师视频套餐(讲师:任铄)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/58" title="软考(高级)项目经理实战营(讲师:张传波)" strategy="undefined" target="_blank">软考(高级)项目经理实战营(讲师:张传波)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/58" title="微信公众平台开发套餐(讲师:刘运强)" strategy="undefined" target="_blank">微信公众平台开发套餐(讲师:刘运强)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/422" title="深度学习原理+实战+算法+主流框架套餐(讲师:唐宇迪)" strategy="undefined" target="_blank">深度学习原理+实战+算法+主流框架套餐(讲师:唐宇迪)</a>
</dd>
<dd style="background:url(http://static.blog.csdn.net/skin/default/images/blog-dot-red3.gif) no-repeat 0 10px; white-space: nowrap;">
<a href="http://edu.csdn.net/combo/detail/471" title="2017系统集成项目管理工程师通关套餐(讲师:徐朋)" strategy="undefined" target="_blank">2017系统集成项目管理工程师通关套餐(讲师:徐朋)</a>
</dd>
</dl>
<!-- 广告位开始 -->
<!-- 广告位结束 -->
<div class="comment_class">
<div id="comment_title" class="panel_head">
<span class="see_comment">查看评论</span><a name="comments"></a></div>
<div id="comment_list"><br> 暂无评论<br><br><div class="clear"></div></div>
<div id="comment_bar">
</div>
<div id="comment_form"><div class="guest_link">您还没有登录,请<a href="javascript:void(0);" onclick="javascript:loginbox();">[登录]</a>或<a href="http://passport.csdn.net/account/register?from=http%3A%2F%2Fblog.csdn.net%2Fa910626%2Farticle%2Fdetails%2F51548840">[注册]</a></div></div>
<div class="announce">
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场<a name="reply"></a><a name="quote"></a></div>
</div>
<script type="text/javascript">
var fileName = '51548840';
var commentscount = 0;
var islock = false
</script>
<div id="ad_bot">
</div>
<div id="report_dialog">
</div>
<div id="d-top" style="bottom:60px;">
<a id="quick-reply" class="btn btn-top q-reply" title="快速回复" style="display:none;">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/blog-icon-reply.png" alt="快速回复">
</a>
<a id="d-top-a" class="btn btn-top backtop" style="display: none;" title="返回顶部" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_huidaodingbu'])">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/top.png" alt="TOP">
</a>
</div>
<script type="text/javascript">
$(function ()
{
$("#ad_frm_0").height("90px");
setTimeout(function(){
$("#ad_frm_2").height("200px");
},1000);
});
</script>
<style type="text/css">
.tag_list
{
background: none repeat scroll 0 0 #FFFFFF;
border: 1px solid #D7CBC1;
color: #000000;
font-size: 12px;
line-height: 20px;
list-style: none outside none;
margin: 10px 2% 0 1%;
padding: 1px;
}
.tag_list h5
{
background: none repeat scroll 0 0 #E0DBD3;
color: #47381C;
font-size: 12px;
height: 24px;
line-height: 24px;
padding: 0 5px;
margin: 0;
}
.tag_list h5 a
{
color: #47381C;
}
.classify
{
margin: 10px 0;
padding: 4px 12px 8px;
}
.classify a
{
margin-right: 20px;
white-space: nowrap;
}
</style>
<div id="pop_win" style="display:none ;position: absolute; z-index: 10000; border: 1px solid rgb(220, 220, 220); top: 222.5px; left: 630px; opacity: 1; background: none 0px 0px repeat scroll rgb(255, 255, 255);">
</div>
<div id="popup_mask"></div>
<style>
#popup_mask
{
position: absolute;
width: 100%;
height: 100%;
background: #000;
z-index: 9999;
left: 0px;
top: 0px;
opacity: 0.3;
filter: alpha(opacity=30);
display: none;
}
</style>
<script type="text/javascript">
$(function(){
setTimeout(function(){
$(".comment_body:contains('回复')").each(function(index,item){
var u=$(this).text().split(':')[0].toString().replace("回复","")
var thisComment=$(this);
if(u)
{
$.getJSON("https://passport.csdn.net/get/nick?callback=?", {users: u}, function(a) {
if(a!=null&&a.data!=null&&a.data.length>0)
{
nick=a.data[0].n;
if(u!=nick)
{
thisComment.text(thisComment.text().replace(u,nick));
}
}
});
}
});
},200);
setTimeout(function(){
$(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); })
},5000);
setTimeout(function(){
$(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); })
},10000);
setTimeout(function(){
$(".math").each(function(index,value){$(this).find("span").last().css("color","#fff"); })
},15000);
setTimeout(function(){
$("a img[src='http://js.tongji.linezing.com/stats.gif']").parent().css({"position":"absolute","left":"50%"});
},300);
});
function loginbox(){
var $logpop=$("#pop_win");
$logpop.html('<iframe src="https://passport.csdn.net/account/loginbox?service=http://static.blog.csdn.net/callback.htm" frameborder="0" height="600" width="400" scrolling="no"></iframe>');
$('#popup_mask').css({
opacity: 0.5,
width: $( document ).width() + 'px',
height: $( document ).height() + 'px'
});
$('#popup_mask').css("display","block");
$logpop.css( {
top: ($( window ).height() - $logpop.height())/ 2 + $( window
).scrollTop() + 'px',
left:($( window ).width() - $logpop.width())/ 2
} );
setTimeout( function () {
$logpop.show();
$logpop.css( {
opacity: 1
} );
}, 200 );
$('#popup_mask').unbind("click");
$('#popup_mask').bind("click", function(){
$('#popup_mask').hide();
var $clopop = $("#pop_win");
$("#common_ask_div_sc").css("display","none");
$clopop.css( {
opacity: 0
} );
setTimeout( function () {
$clopop.hide();
}, 350 );
return false;
});
}
var articletitle='Scroller使用分析';
</script>
<div class="clear">
</div>
</div>
</div>
<div id="side">
<div class="side">
<div class="panel" id="panel_Search">
<ul class="panel_head"><span>文章搜索</span></ul>
<ul class="panel_body">
<form id="frmSearch" action="http://so.csdn.net/search" class="form_search csdn-tracking-statistics" target="_blank" data-mod="popu_306">
<span><input id="inputSearch" type="text" class="blogsearch" title="请输入关键字"></span>
<input id="btnSubmit" type="button" value="搜索" title="search in blog">
<input type="hidden" name="q" id="inputQ">
<input type="hidden" name="t" value="blog">
<a id="btnSearchBlog" target="_blank"></a>
</form>
</ul>
</div>
<script type="text/javascript">
$(function () {
$("#btnSubmit").unbind("click");
$("#btnSubmit").click(function () {
search();
});
$("#frmSearch").submit(function () {
search();
return false;
});
function search()
{
if ($("#inputSearch").val() == "") {
alert("请录入搜索关键词!");
return false;
}
//var url = "http://so.csdn.net/so/search/s.do?q=" + encodeURIComponent($("#inputSearch").val()) + "&u=" + username + "&t=blog";
var url = "https://www.baidu.com/s?wd=" + encodeURIComponent($("#inputSearch").val()) + "%20site%3Ablog.csdn.net"
window.location.href = url;
}
});
</script>
<div id="custom_column_38602869" class="panel">
<ul class="panel_head"><span>写给自己</span></ul>
<ul class="panel_body">
<div height="120" width="150" align="center"></div>
<div>○ 种一棵树最好的时间是十年前,其次是现在 <br>
</div>
<p></p>
○ 坚持输出,坚持书写,才可以持续成长 <br>
<p></p>
○ 所有美好事物的成长都是缓慢的 <br>
<p></p>
○ 既往不恋,未来不迎,当下不杂<br>
<p></p>
○ 业精于勤,荒于嬉,行成于思,毁于随<br>
<p></p>
○将军赶路 不追小兔<br>
<p></p>
○不要拘泥于语言,同样也不要拘泥于行业,眼光放远一点<br>
<p></p>
○ 如果某件事你做的不够好,不必介怀,因为以后的每一次每一天你都会做得越来越好<br>
<p></p>
○ 此心不于事上磨,更于何处磨此心
<br>
<p></p>
○ 保持热情,保持求知欲<br>
<p></p>
○ 千里之行,始于足下<br>
<p></p>
○ 最怕你一生碌碌无为,还安慰自己平凡可贵。<br>
<p></p>
○ 对于任何事,要保持自觉积极主动探索尝试。但是如果自己不积极认真地生活,不管得到什么样的回答都没有用。——解忧杂货店
</ul>
</div><div id="panel_Profile" class="panel">
<ul class="panel_head"><span>个人资料</span></ul>
<ul class="panel_body profile">
<div id="blog_userface">
<a href="http://my.csdn.net/a910626" target="_blank">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/1_a910626.jpg" title="访问我的空间" style="max-width:90%">
</a>
<br>
<span><a href="http://my.csdn.net/a910626" class="user_name" target="_blank">下一个五年</a></span>
</div>
<div class="interact">
<a href="javascript:void(0);" class="attent" id="span_add_follow" title="[加关注]"></a>
<a href="javascript:void(0);" class="letter" title="[发私信]" onclick="window.open('http://msg.csdn.net/letters/model?receiver=a910626','_blank','height=350,width=700');_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_sixin'])"></a>
</div>
<div id="blog_medal">
<div class="ico_expert" onclick="javascript:location='http://blog.csdn.net/experts/rule.html'" title="CSDN认证专家" style="cursor:pointer;width:60px;height:60px;background:url('http://c.csdnimg.cn/jifen/images/xunzhang/xunzhang/bokezhuanjiamiddle.png') no-repeat"></div>
<div id="bms_box">
<a target="_blank">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/zhuanlandaren.png" onmouseover="m_over_m(this,2)" onmouseout="m_out_m()" alt="2">
</a>
<a target="_blank">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/chizhiyiheng.png" onmouseover="m_over_m(this,4)" onmouseout="m_out_m()" alt="1">
</a>
</div>
</div>
<ul id="blog_rank">
<li>访问:<span>528718次</span></li>
<li>积分:<span>7851</span> </li>
<li>等级: <span style="position:relative;display:inline-block;z-index:1">
<img src="./Scroller使用分析 - 安诺爱思考 - CSDN博客_files/blog6.png" alt="" style="vertical-align: middle;" id="leveImg">
<div id="smallTittle" style=" position: absolute; left: -24px; top: 25px; text-align: center; width: 101px; height: 32px; background-color: #fff; line-height: 32px; border: 2px #DDDDDD solid; box-shadow: 0px 2px 2px rgba (0,0,0,0.1); display: none; z-index: 999;">
<div style="left: 42%; top: -8px; position: absolute; width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-bottom: 8px solid #EAEAEA;"></div>
积分:7851 </div>
</span> </li>
<li>排名:<span>第2539名</span></li>
</ul>
<ul id="blog_statistics">
<li>原创:<span>360篇</span></li>
<li>转载:<span>62篇</span></li>
<li>译文:<span>0篇</span></li>
<li>评论:<span>132条</span></li>
</ul>
</ul>
</div>
<div id="custom_column_38518779" class="panel">
<ul class="panel_head"><span>个人简介</span></ul>
<ul class="panel_body">
<b>专业技能:</b>
<p>android, linux, Java, C/C++, Python, SQL, servlet&jsp, html</p>
<b>相关项目经验:</b>
<p>桌面应用,Android,Java web项目,Python web项目</p>
<b>实践输出平台:</b>
<p>github <a href="https://github.com/zhujainxipan" target="view_window">https://github.com/zhujainxipan</a></p>
<p>博客 <a href="http://blog.csdn.net/a910626" target="view_window">http://blog.csdn.net/a910626</a></p>
</ul>
</div><div id="panel_Category" class="panel">
<ul class="panel_head"><span>文章分类</span></ul>
<ul class="panel_body">
<li>
<a href="http://blog.csdn.net/a910626/article/category/6153362" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【设计模式&重构&UML建模】</a><span>(66)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/6089863" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【自定义view与动画】</a><span>(14)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/6270651" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【java并发】</a><span>(13)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/3142829" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【开源项目源码分析/架构分析】</a><span>(30)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/1256032" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【android提高】</a><span>(117)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/1255980" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【java提高】</a><span>(62)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/1256029" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【数据库】</a><span>(2)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/1256034" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【个人思考与反省】</a><span>(31)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/1256044" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【读书笔记】</a><span>(14)</span>
</li>
<li>
<a href="http://blog.csdn.net/a910626/article/category/1258773" onclick="_gaq.push(['_trackEvent','function', 'onclick', 'blog_articles_wenzhangfenlei']); ">【linux】</a><span>(2)</span>
</li>
<li>