-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
710 lines (415 loc) · 20.8 KB
/
index.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>闲池阁</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="description">
<meta property="og:type" content="website">
<meta property="og:title" content="闲池阁">
<meta property="og:url" content="http://seewhy.me/index.html">
<meta property="og:site_name" content="闲池阁">
<meta property="og:description">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="闲池阁">
<meta name="twitter:description">
<link rel="alternative" href="/atom.xml" title="闲池阁" type="application/atom+xml">
<link rel="icon" href="/favicon.png">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<script src="http://libs.baidu.com/jquery/1.9.0/jquery.js"></script>
<script type="text/javascript">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "//hm.baidu.com/hm.js?56e8514e9ecf50490a45089bcf2fc5af";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72449428-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
</head>
<body>
<div id="container">
<div class="left-col">
<div class="overlay"></div>
<div class="intrude-less">
<header id="header" class="inner">
<a href="/" class="profilepic">
<img lazy-src="http://7xiw1r.com1.z0.glb.clouddn.com/head.jpg" class="js-avatar">
</a>
<hgroup>
<h1 class="header-author"><a href="/">seewhy</a></h1>
</hgroup>
<p class="header-subtitle">宠辱不惊,看庭前花开花落。去留无意,望天空云卷云舒。</p>
<div class="switch-btn">
<div class="icon">
<div class="icon-ctn">
<div class="icon-wrap icon-house" data-idx="0">
<div class="birdhouse"></div>
<div class="birdhouse_holes"></div>
</div>
<div class="icon-wrap icon-ribbon hide" data-idx="1">
<div class="ribbon"></div>
</div>
<div class="icon-wrap icon-me hide" data-idx="3">
<div class="user"></div>
<div class="shoulder"></div>
</div>
</div>
</div>
<div class="tips-box hide">
<div class="tips-arrow"></div>
<ul class="tips-inner">
<li>菜单</li>
<li>标签</li>
<li>关于我</li>
</ul>
</div>
</div>
<div class="switch-area">
<div class="switch-wrap">
<section class="switch-part switch-part1">
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">所有文章</a></li>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/seewhy93" title="github">github</a>
<a class="zhihu" target="_blank" href="http://www.zhihu.com/people/seewhy" title="zhihu">zhihu</a>
<a class="rss" target="_blank" href="/atom.xml" title="rss">rss</a>
<a class="twitter" target="_blank" href="https://twitter.com/seewhy163" title="twitter">twitter</a>
</div>
</nav>
</section>
<section class="switch-part switch-part2">
<div class="widget tagcloud" id="js-tagcloud">
<a href="/tags/AOSP/" style="font-size: 10px;">AOSP</a> <a href="/tags/Android/" style="font-size: 10px;">Android</a> <a href="/tags/fragment/" style="font-size: 10px;">fragment</a> <a href="/tags/python/" style="font-size: 10px;">python</a> <a href="/tags/工具/" style="font-size: 10px;">工具</a> <a href="/tags/效率/" style="font-size: 10px;">效率</a> <a href="/tags/热补丁/" style="font-size: 10px;">热补丁</a> <a href="/tags/读书笔记/" style="font-size: 20px;">读书笔记</a> <a href="/tags/面试/" style="font-size: 15px;">面试</a>
</div>
</section>
<section class="switch-part switch-part3">
<div id="js-aboutme">Android开发者</div>
</section>
</div>
</div>
</header>
</div>
</div>
<div class="mid-col">
<nav id="mobile-nav">
<div class="overlay">
<div class="slider-trigger"></div>
<h1 class="header-author js-mobile-header hide">seewhy</h1>
</div>
<div class="intrude-less">
<header id="header" class="inner">
<div class="profilepic">
<img lazy-src="http://7xiw1r.com1.z0.glb.clouddn.com/head.jpg" class="js-avatar">
</div>
<hgroup>
<h1 class="header-author">seewhy</h1>
</hgroup>
<p class="header-subtitle">宠辱不惊,看庭前花开花落。去留无意,望天空云卷云舒。</p>
<nav class="header-menu">
<ul>
<li><a href="/">主页</a></li>
<li><a href="/archives">所有文章</a></li>
<div class="clearfix"></div>
</ul>
</nav>
<nav class="header-nav">
<div class="social">
<a class="github" target="_blank" href="https://github.com/seewhy93" title="github">github</a>
<a class="zhihu" target="_blank" href="http://www.zhihu.com/people/seewhy" title="zhihu">zhihu</a>
<a class="rss" target="_blank" href="/atom.xml" title="rss">rss</a>
<a class="twitter" target="_blank" href="https://twitter.com/seewhy163" title="twitter">twitter</a>
</div>
</nav>
</header>
</div>
</nav>
<div class="body-wrap">
<article id="post-artsearchreadnote9" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/02/20/artsearchreadnote9/" class="article-date">
<time datetime="2016-02-20T06:51:39.000Z" itemprop="datePublished">2016-02-20</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/02/20/artsearchreadnote9/">Android开发艺术探索读书笔记 第九章 四大组件的工作过程</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="9-1_四大组件的运行状态">9.1 四大组件的运行状态</h1><p>四大组件除了BroadcastReceiver,其他都必须在AndroidManifest中注册。<br>BroadcastReceiver可以在AndroidManifest静态注册,也可以动态注册。</p>
<p>Activity的主要作用是展示一个界面和用户交互。</p>
<p>Service是一种计算型组件,用于在后台执行一系列计算任务。Service有两种状态,启动状态和绑定状态。启动状态时,不需要和外界直接交互。绑定状态可以和外界通信。Service运行在主线程中。 </p>
<p>BroadcastReceiver静态注册在安装时被系统解析,动态注册通过Context.registerReceiver()。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/读书笔记/">读书笔记</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2016/02/20/artsearchreadnote9/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-artsearchreadnote8" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/01/06/artsearchreadnote8/" class="article-date">
<time datetime="2016-01-06T11:56:37.000Z" itemprop="datePublished">2016-01-06</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/01/06/artsearchreadnote8/">Android开发艺术探索读书笔记 第八章 理解Window和WindowManager</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Window是一个抽象类,具体实现是PhoneWindow。</p>
<h1 id="8-1_Window和WindowManager">8.1 Window和WindowManager</h1><p>FLAG_NOT_FOCUSABLE<br>表示Window不需要获取焦点,也不需要接收各种输入事件,此标记会同时开启FLAG_NOT_TOUCH_MODAL<br>FLAG_NOT_TOUCH_MODAL<br>开启后可以将当期WWindow区域以外的事件传递给底层Window。<br>FLAG_SHOW_WHEN_LOCKED<br>开启此模式可以让Window显示在锁屏上<br>Type参数表示Window的类型,有三种,应用Window,子Window和系统Window。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/读书笔记/">读书笔记</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2016/01/06/artsearchreadnote8/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-artsearchreadnote7" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/01/03/artsearchreadnote7/" class="article-date">
<time datetime="2016-01-03T11:56:37.000Z" itemprop="datePublished">2016-01-03</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/01/03/artsearchreadnote7/">Android开发艺术探索读书笔记 第七章 Android动画深入分析</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="7-1_view动画">7.1 view动画</h1><p>View动画,有4种,平移、选择、缩放、透明度动画。</p>
<p>可以通过接口AnimationListener监听动画。</p>
<h2 id="7-1-2_自定义动画">7.1.2 自定义动画</h2><p>继承Animation抽象类,重写initalize和applyTransformation方法。</p>
<p>在applyTransformation进行矩阵变换,可以实现3D效果。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/读书笔记/">读书笔记</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2016/01/03/artsearchreadnote7/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-aospcompilation" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2016/01/01/aospcompilation/" class="article-date">
<time datetime="2016-01-01T14:09:01.000Z" itemprop="datePublished">2016-01-01</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2016/01/01/aospcompilation/">在Mac 10.11中编译Android 6.0源码</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="背景">背景</h1><p>前几天心血来潮想编译Android源码,总共花了大概三天的时间,碰到一些问题,记录一下防止以后忘掉。</p>
<h1 id="本地环境">本地环境</h1><p>系统版本: OS X 10.11.2<br>git : 2.6.4<br>port :2.3.4<br>make : 3.81<br>curl : 7.46.0</p>
<h1 id="环境配置">环境配置</h1><p>首先需要一个区分大小写的硬盘,至少要100G,我是在一个移动硬盘上编译,所以直接磁盘工具->选择硬盘->抹掉,格式选择第二个”OS X扩展(区分大小写,日志式)”就可以了。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/AOSP/">AOSP</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2016/01/01/aospcompilation/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-artsearchreadnote6" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/12/27/artsearchreadnote6/" class="article-date">
<time datetime="2015-12-27T14:07:03.000Z" itemprop="datePublished">2015-12-27</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/12/27/artsearchreadnote6/">Android开发艺术探索读书笔记 第六章 Android的Drawable</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<p>Drawable表示可以在Canvas上进行绘制的抽象的概念。</p>
<p>非图片类型Drawable占用空间小,可以减少apk大小。</p>
<p>BitmapDrawable表示一张图片,对应xml标签<bitmap></p>
<p>NinePatchDrawable,表示一张.9图,<nine-patch>,在bitmap标签中也可以使用.9图。</p>
<p>ShapDrawable表示以颜色构造的图形,可以纯色,也可以渐变。<shape></p>
<p>LayerDrawable表示层次化的drawable集合,下面的item会覆盖上面的item。<layer-list></p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/读书笔记/">读书笔记</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2015/12/27/artsearchreadnote6/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-artsearchreadnote5" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/12/18/artsearchreadnote5/" class="article-date">
<time datetime="2015-12-18T13:35:53.000Z" itemprop="datePublished">2015-12-18</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/12/18/artsearchreadnote5/">Android开发艺术探索读书笔记 第五章 理解remoteViews</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="5-1-1">5.1.1</h1><p>RemoteViews用于自定义Notification。<br>PendingIntent表示待定Intent,包含的意图由用户触发。</p>
<h1 id="5-1-3">5.1.3</h1><p>PendingIntent支持三种待定意图:启动Activity,启动Service和发送广播。<br>getActivity(Context context,int requestCode, Intent intent, int flags)<br>如果两个PendingIntent内部的Intent相同并且requestCode也相同,那么这两个PendingIntent是相同的。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/读书笔记/">读书笔记</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2015/12/18/artsearchreadnote5/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<article id="post-AndFixIntroduce" class="article article-type-post" itemscope itemprop="blogPost">
<div class="article-meta">
<a href="/2015/12/15/AndFixIntroduce/" class="article-date">
<time datetime="2015-12-14T16:41:51.000Z" itemprop="datePublished">2015-12-15</time>
</a>
</div>
<div class="article-inner">
<input type="hidden" class="isFancy" />
<header class="article-header">
<h1 itemprop="name">
<a class="article-title" href="/2015/12/15/AndFixIntroduce/">AndFix使用介绍</a>
</h1>
</header>
<div class="article-entry" itemprop="articleBody">
<h1 id="介绍">介绍</h1><p>AndFix,全称是<strong>And</strong>roid hot-<strong>fix</strong>。是阿里开源的一个Android热补丁框架,允许APP在不重新发布版本的情况下修复线上的bug。支持Android 2.3 到 6.0。</p>
<h1 id="使用方式">使用方式</h1><ol>
<li>首先添加依赖<br><code>compile 'com.alipay.euler:andfix:0.3.1@aar'</code></li>
<li>然后在Application.onCreate() 中添加以下代码<figure class="highlight dns"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">patchManager = new PatchManager(context)<span class="comment">;</span></span><br><span class="line">patchManager.init(appversion)<span class="comment">;//current version</span></span><br><span class="line">patchManager.loadPatch()<span class="comment">;</span></span><br></pre></td></tr></table></figure>
</li>
</ol>
<p>可以用这句话获取appversion<br><code>String appversion= getPackageManager().getPackageInfo(getPackageName(), 0).versionName;</code><br>注意每次appversion变更都会导致所有补丁被删除,如果appversion没有改变,则会加载已经保存的所有补丁。</p>
</div>
<div class="article-info article-info-index">
<div class="article-tag tagcloud">
<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/热补丁/">热补丁</a></li></ul>
</div>
<p class="article-more-link">
<a href="/2015/12/15/AndFixIntroduce/#more">more >></a>
</p>
<div class="clearfix"></div>
</div>
</div>
</article>
<nav id="page-nav">
<span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="page-number" href="/page/3/">3</a><a class="extend next" rel="next" href="/page/2/">Next »</a>
</nav>
</div>
<footer id="footer">
<div class="outer">
<div id="footer-info">
<div class="footer-left">
© 2016 seewhy
</div>
<div class="footer-right">
<a href="http://hexo.io/" target="_blank">Hexo</a> Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
</div>
</div>
</div>
</footer>
</div>
<link rel="stylesheet" href="/fancybox/jquery.fancybox.css" type="text/css">
<script>
var yiliaConfig = {
fancybox: true,
mathjax: true,
animate: true,
isHome: false,
isPost: false,
isArchive: false,
isTag: false,
isCategory: false,
open_in_new: false
}
</script>
<script src="http://7.url.cn/edu/jslib/comb/require-2.1.6,jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="/js/main.js" type="text/javascript"></script>
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-72449428-1', 'auto');
ga('send', 'pageview');
</script>
<!-- End Google Analytics -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {
inlineMath: [ ['$','$'], ["\\(","\\)"] ],
processEscapes: true,
skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
}
});
MathJax.Hub.Queue(function() {
var all = MathJax.Hub.getAllJax(), i;
for(i=0; i < all.length; i += 1) {
all[i].SourceElement().parentNode.className += ' has-jax';
}
});
</script>
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</div>
</body>
</html>