Skip to content

Commit 1500bf7

Browse files
committed
Improve Demo
1 parent dbe1813 commit 1500bf7

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

demo/src/main/java/me/jessyan/autosize/demo/BaseApplication.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ public void onAdaptAfter(Object target, Activity activity) {
7979
// .setLog(false)
8080

8181
//是否使用设备的实际尺寸做适配, 默认为 false, 如果设置为 false, 在以屏幕高度为基准进行适配时
82-
//AutoSize 会将屏幕总高度减去状态栏高度来做适配, 如果设备上有导航栏还会减去导航栏的高度
83-
//设置为 true 则使用设备的实际屏幕高度, 不会减去状态栏以及导航栏高度
82+
//AutoSize 会将屏幕总高度减去状态栏高度来做适配
83+
//设置为 true 则使用设备的实际屏幕高度, 不会减去状态栏高度
8484
// .setUseDeviceSize(true)
8585

8686
//是否全局按照宽度进行等比例适配, 默认为 true, 如果设置为 false, AutoSize 会全局按照高度进行适配

demo/src/main/res/layout/activity_custom_adapt.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,17 @@
5151

5252
<TextView
5353
android:layout_width="match_parent"
54-
android:layout_height="192dp"
54+
android:layout_height="191dp"
5555
android:background="#d21"
5656
android:gravity="center"
57-
android:text="H-192dp"
57+
android:text="H-191dp"
5858
android:textColor="#fff"
5959
android:textSize="20sp"/>
60+
61+
<TextView
62+
android:layout_width="match_parent"
63+
android:layout_height="1dp"
64+
android:background="#fff"
65+
/>
6066
</LinearLayout>
6167
</LinearLayout>

0 commit comments

Comments
 (0)