Skip to content

Commit 06883db

Browse files
committed
update
1 parent 21a68b2 commit 06883db

6 files changed

Lines changed: 30 additions & 116 deletions

‎.DS_Store‎

0 Bytes
Binary file not shown.

‎_posts/2014-12-21-小米12月四周工作记录.md‎

Lines changed: 0 additions & 116 deletions
This file was deleted.

‎_posts/2015-01-04-小米01月第一周工作记录.md‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,33 @@ tags : [工作,android,记录]
1414

1515
![](/img/QQ20150104-1.png)
1616

17+
左图,Surface就像是UI的画布,而App则像是在Surface上作画,无论其用哪种技术。
18+
19+
右图,Surface向SurfaceFlinger提供数据,而SurfaceFlinger则混合数据。
20+
21+
22+
![](/img/QQ20150104-2.png)
23+
24+
在 ActivityThread.java 的 `performLauchActivity(ActivityRecord r,Intent customIntent)` 方法中 Instrumentation 通过反射机制创建 Activity,关键代码为
25+
26+
`activity = mInstrumentation.newActivity(cl, component.getClassName(), r.intent);`
27+
28+
在方法 `newActivity`中,new 出 Activity 后调用方法 `activity.attach(...)` (Activity.java) 将 Activity 与 Window 进行关联。
29+
30+
window 是在 `activity.attach(...)` 中使用 `mWindow = PolicyManager.makeNewWindow(this)` 创建的。 `mWindow` 的真正类型是 PhoneWindow。
31+
32+
在 Activity.java 中使用 `mWindow.setWindowManager(...)` 将 Window 与 WindowManager 进行关联。而 `mWindowManager` 的真实类型是 LocalWindowManager ,LocalWindowManager 又使用代理 Proxy 模式,将任务委托给 WindowManagerImpl 处理。
33+
34+
![](/img/QQ20150104-2.png)
35+
36+
在 ActivityThread.java 的 `handleResumeActivity(IBinder token, boolean clearHide,boolean isForward)` 方法中进行了DecorView与ViewManager关联。
37+
38+
39+
40+
---
41+
42+
01.05
43+
44+
`android:inputType=""`属性有text,mutiText等,text默认的是一行,会覆盖`singleLine`属性,设置多行一行时要注意。
45+
46+
UI心得,透明许多时候能成为实现效果的捷径。

‎img/.DS_Store‎

2 KB
Binary file not shown.

‎img/QQ20150104-2.png‎

145 KB
Loading

‎img/QQ20150104-3.png‎

321 KB
Loading

0 commit comments

Comments
 (0)