Skip to content

Commit a4f6e72

Browse files
committed
更新文档
1 parent ee18b4b commit a4f6e72

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,16 @@ XUI.getInstance().initFontStyle("fonts/hwxk.ttf");
141141

142142
(2)在项目的基础Activity中加入如下代码注入字体.
143143

144+
注意:1.1.4版本之后使用如下设置注入
145+
```
146+
@Override
147+
protected void attachBaseContext(Context newBase) {
148+
//注入字体
149+
super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
150+
}
151+
```
152+
153+
注意:1.1.3版本及之前的版本使用如下设置注入
144154
```
145155
@Override
146156
protected void attachBaseContext(Context newBase) {

docs/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ XUI.getInstance().initFontStyle("fonts/hwxk.ttf");
133133

134134
(2)在项目的基础Activity中加入如下代码注入字体.
135135

136+
注意:1.1.4版本之后使用如下设置注入
137+
```
138+
@Override
139+
protected void attachBaseContext(Context newBase) {
140+
//注入字体
141+
super.attachBaseContext(ViewPumpContextWrapper.wrap(newBase));
142+
}
143+
```
144+
145+
注意:1.1.3版本及之前的版本使用如下设置注入
136146
```
137147
@Override
138148
protected void attachBaseContext(Context newBase) {

0 commit comments

Comments
 (0)