Skip to content

Commit 80c5677

Browse files
committed
修改一些问题
1 parent 00af516 commit 80c5677

File tree

3 files changed

+11
-10
lines changed

3 files changed

+11
-10
lines changed

README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ values 目录下的 dimens.xml
8585

8686
## 第二种适配方式 - DisplayMetrics.densityDpi 属性修改
8787
插件版本:
88-
[ ![Download](https://api.bintray.com/packages/bugyun/maven/screen-helper/images/download.svg?version=1.0.1) ](https://bintray.com/bugyun/maven/screen-helper/1.0.1/link)
88+
[ ![Download](https://api.bintray.com/packages/bugyun/maven/screen-helper/images/download.svg?version=1.0.2) ](https://bintray.com/bugyun/maven/screen-helper/1.0.2/link)
8989

9090
在项目的根 build.gradle 中添加 jcenter 仓库
9191
```java
@@ -107,7 +107,7 @@ allprojects {
107107
然后在子项目中的 build.gradle 文件中添加
108108
```java
109109
dependencies {
110-
implementation 'vip.ruoyun.helper:screen-helper:1.0.1'
110+
implementation 'vip.ruoyun.helper:screen-helper:1.0.2'
111111
}
112112
```
113113

@@ -116,7 +116,7 @@ dependencies {
116116
public class MainActivity extends AppCompatActivity {
117117
@Override
118118
public Resources getResources() {
119-
return ScreenHelper.applyAdapt(super.getResources(), 450f, ScreenHelper.ScreenMode.WIDTH_DP);
119+
return ScreenHelper.applyAdapt(super.getResources(), 450f, ScreenHelper.WIDTH_DP);
120120
}
121121
}
122122
```
@@ -127,17 +127,18 @@ public class MainActivity extends AppCompatActivity {
127127
public class App extends Application {
128128
@Override
129129
public Resources getResources() {
130-
return ScreenHelper.applyAdapt(super.getResources(), 450f, ScreenHelper.ScreenMode.WIDTH_DP);
130+
return ScreenHelper.applyAdapt(super.getResources(), 450f, ScreenHelper.WIDTH_DP);
131131
}
132132
}
133133
```
134134

135135
#### 类型
136-
- ScreenHelper.ScreenMode.WIDTH_DP 以 dp 来适配,在 xml 中使用 dp 单位
137-
- ScreenHelper.ScreenMode.WIDTH_PT 以 pt 来适配,在 xml 中使用 pt 单位
138-
- ScreenHelper.ScreenMode.HEIGHT_PT 以 pt 来适配,在 xml 中使用 pt 单位
136+
- ScreenHelper.WIDTH_DP 以 dp 来适配,在 xml 中使用 dp 单位
137+
- ScreenHelper.WIDTH_PT 以 pt 来适配,在 xml 中使用 pt 单位
138+
- ScreenHelper.HEIGHT_PT 以 pt 来适配,在 xml 中使用 pt 单位
139139

140140

141141
#### 版本变化
142+
- 1.0.2 :优化传递 ScreenMode 的参数传递,去除不必要的 log
142143
- 1.0.1 :优化 Resources.getSystem() 变量获取,由于此方法是 synchronized ,如果频繁调用会影响性能
143144
- 1.0.0 :正式发版

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ dependencies {
4040
testImplementation 'junit:junit:4.12'
4141
androidTestImplementation 'com.android.support.test:runner:1.0.2'
4242
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
43-
implementation project(path: ':screen-helper')
44-
// implementation 'vip.ruoyun.helper:screen-helper:1.0.1'
43+
// implementation project(path: ':screen-helper')
44+
implementation 'vip.ruoyun.helper:screen-helper:1.0.2'
4545

4646
}
4747

screen-helper/jcenter.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ publish {
1212
userOrg = 'bugyun' //bintray.com用户名
1313
groupId = 'vip.ruoyun.helper' //jcenter group
1414
artifactId = 'screen-helper' //项目名称 name
15-
publishVersion = '1.0.1'//版本号 version
15+
publishVersion = '1.0.2'//版本号 version
1616
desc = 'android 屏幕适配帮助类'//描述
1717
website = 'https://github.com/bugyun/ScreenHelper' // github 网址
1818
}

0 commit comments

Comments
 (0)