Skip to content

Commit 56ffff4

Browse files
committed
update readme
1 parent 2e1e6e5 commit 56ffff4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

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

33
一个简单的,方便的多屏适配的Android库
44

5-
# 本质就是百分比缩放
5+
## 本质就是百分比缩放
66

7-
## 和 android-percent-support-lib 的不同
7+
### 和 android-percent-support-lib 的不同
88

99
1. **更科学**
1010
``android-percent-support-lib`` 是父控件和子控件的百分比关系
@@ -18,13 +18,13 @@
1818
``android-percent-support-lib`` 需要把设计尺寸算成百分比
1919
``Android-ScaleLayout`` 直接把设计尺寸填入``layou.xml``即可
2020

21-
## Android有良好的多屏适配系统,为何设计ScaleLayout?
21+
### Android有良好的多屏适配系统,为何设计ScaleLayout?
2222

2323

2424

25-
# 如何使用
25+
## 如何使用
2626

27-
## 基本原理
27+
### 基本原理
2828
+ 设计属性
2929
设计手机的宽高,像素密度,设计尺寸(dp)
3030
+ 设备属性
@@ -41,7 +41,7 @@ float designPixel = designDP * designDensity // dp 转 pixel
4141
float realPixel = (mScreenWidth * designDensity * getPixelSize()) / (designScreenWidth * mDensity)
4242
```
4343

44-
## 属性
44+
### 属性
4545

4646
```xml
4747
<?xml version="1.0" encoding="utf-8"?>
@@ -77,7 +77,7 @@ float realPixel = (mScreenWidth * designDensity * getPixelSize()) / (designScree
7777
</resources>
7878
```
7979

80-
## 使用
80+
### 使用
8181

8282
```xml
8383
<cn.gavinliu.android.lib.scale.ScaleRelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
@@ -126,15 +126,15 @@ float realPixel = (mScreenWidth * designDensity * getPixelSize()) / (designScree
126126
</cn.gavinliu.android.lib.scale.ScaleRelativeLayout>
127127
```
128128

129-
## 注意事项
129+
### 注意事项
130130

131-
1. 缩放方式
131+
1. 建议缩放方式
132132
上下滑动的界面按**屏幕宽**等比缩放
133133
左右滑动的界面按**屏幕高**等比缩放
134-
2.
135-
``cn.gavinliu.android.lib.scale.ScaleLayout`` 必须包含 layout_design_*
134+
2. 控件须知
135+
``cn.gavinliu.android.lib.scale.Scale*Layout`` 必须包含 layout_design_*
136136
``layout_scale_by`` 默认值为 width
137137

138-
# License
138+
## License
139139

140140
MIT

0 commit comments

Comments
 (0)