Skip to content

Commit 0a13321

Browse files
committed
Release v0.8.0
1 parent 3d1ede9 commit 0a13321

File tree

4 files changed

+63
-9
lines changed

4 files changed

+63
-9
lines changed

README-zh.md

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p align="center">
44
<a href="https://bintray.com/jessyancoding/maven/autosize/_latestVersion">
5-
<img src="https://img.shields.io/badge/Jcenter-v0.7.0-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
5+
<img src="https://img.shields.io/badge/Jcenter-v0.8.0-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
66
</a>
77
<a href="https://travis-ci.org/JessYanCoding/AndroidAutoSize">
88
<img src="https://travis-ci.org/JessYanCoding/AndroidAutoSize.svg?branch=master" alt="Build Status" />
@@ -70,7 +70,7 @@
7070

7171
## Download
7272
``` gradle
73-
implementation 'me.jessyan:autosize:0.7.0'
73+
implementation 'me.jessyan:autosize:0.8.0'
7474
```
7575

7676
## Usage
@@ -91,7 +91,8 @@
9191

9292
## Advanced (以下用法看不懂?答应我,认真看 Demo 好不好?)
9393

94-
* **当某个页面的设计图尺寸与在 AndroidManifest 中填写的全局设计图尺寸不同时,可以实现 CustomAdapt 接口扩展适配参数**
94+
### Activity
95+
* **当某个 Activity 的设计图尺寸与在 AndroidManifest 中填写的全局设计图尺寸不同时,可以实现 CustomAdapt 接口扩展适配参数**
9596
```java
9697
public class CustomAdaptActivity extends AppCompatActivity implements CustomAdapt {
9798

@@ -108,14 +109,40 @@ public class CustomAdaptActivity extends AppCompatActivity implements CustomAdap
108109

109110
```
110111

111-
* **当某个页面想放弃适配,请实现 CancelAdapt 接口**
112+
* **当某个 Activity 想放弃适配,请实现 CancelAdapt 接口**
112113
```java
113114
public class CancelAdaptActivity extends AppCompatActivity implements CancelAdapt {
114115

115116
}
116117

117118
```
118119

120+
### Fragment
121+
* **当某个 Fragment 的设计图尺寸与在 AndroidManifest 中填写的全局设计图尺寸不同时,可以实现 CustomAdapt 接口扩展适配参数**
122+
```java
123+
public class CustomAdaptFragment extends Fragment implements CustomAdapt {
124+
125+
@Override
126+
public boolean isBaseOnWidth() {
127+
return false;
128+
}
129+
130+
@Override
131+
public float getSizeInDp() {
132+
return 667;
133+
}
134+
}
135+
136+
```
137+
138+
* **当某个 Fragment 想放弃适配,请实现 CancelAdapt 接口**
139+
```java
140+
public class CancelAdaptFragment extends Fragment implements CancelAdapt {
141+
142+
}
143+
144+
```
145+
119146
## ProGuard
120147
```
121148
-keep class me.jessyan.autosize.** { *; }

README.md

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<p align="center">
44
<a href="https://bintray.com/jessyancoding/maven/autosize/_latestVersion">
5-
<img src="https://img.shields.io/badge/Jcenter-v0.7.0-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
5+
<img src="https://img.shields.io/badge/Jcenter-v0.8.0-brightgreen.svg?style=flat-square" alt="Latest Stable Version" />
66
</a>
77
<a href="https://travis-ci.org/JessYanCoding/AndroidAutoSize">
88
<img src="https://travis-ci.org/JessYanCoding/AndroidAutoSize.svg?branch=master" alt="Build Status" />
@@ -72,7 +72,7 @@
7272

7373
## Download
7474
``` gradle
75-
implementation 'me.jessyan:autosize:0.7.0'
75+
implementation 'me.jessyan:autosize:0.8.0'
7676
```
7777

7878
## Usage (just one steps)
@@ -93,6 +93,7 @@
9393

9494
## Advance (see demo)
9595

96+
### Activity
9697
* **Customize the adaptation parameters of the Activity:**
9798
```java
9899
public class CustomAdaptActivity extends AppCompatActivity implements CustomAdapt {
@@ -118,6 +119,32 @@ public class CancelAdaptActivity extends AppCompatActivity implements CancelAdap
118119

119120
```
120121

122+
### Fragment
123+
* **Customize the adaptation parameters of the Fragment:**
124+
```java
125+
public class CustomAdaptFragment extends Fragment implements CustomAdapt {
126+
127+
@Override
128+
public boolean isBaseOnWidth() {
129+
return false;
130+
}
131+
132+
@Override
133+
public float getSizeInDp() {
134+
return 667;
135+
}
136+
}
137+
138+
```
139+
140+
* **Cancel the adaptation of the Fragment:**
141+
```java
142+
public class CancelAdaptFragment extends Fragment implements CancelAdapt {
143+
144+
}
145+
146+
```
147+
121148
## ProGuard
122149
```
123150
-keep class me.jessyan.autosize.** { *; }

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ ext {
2929
targetSdkVersion = 27
3030
compileSdkVersion = 27
3131
buildToolsVersion = "27.0.3"
32-
versionCode = 15
33-
versionName = "0.7.0"
32+
versionCode = 18
33+
versionName = "0.8.0"
3434
}

demo/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121
}
2222

2323
dependencies {
24-
// implementation 'me.jessyan:autosize:0.7.0'
24+
// implementation 'me.jessyan:autosize:0.8.0'
2525
implementation project(':autosize')
2626
implementation 'com.android.support:appcompat-v7:27.1.1'
2727
implementation 'cat.ereza:customactivityoncrash:2.2.0'

0 commit comments

Comments
 (0)