Skip to content

Commit 610431f

Browse files
author
uis
committed
更新demo
1 parent cfa0a19 commit 610431f

7 files changed

Lines changed: 24 additions & 15 deletions

File tree

README-StackLayout.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# StackLayout
2-
**A swipe ViewGroup that supports left and right slide.**
32

43
**层叠View支持手势左右滑动,自动轮播,过渡动画**
54

@@ -21,10 +20,10 @@
2120

2221
#### Captures
2322

24-
![效果图]()
23+
![效果图](images/image_normal) ![效果图](images/image_left) ![效果图](images/image_right)
2524

2625
### Use
27-
implementation 'com.uis:stacklayout:0.3.4'
26+
implementation 'com.uis:stacklayout:0.5.0'
2827

2928
*Name*| *Descript*|*Value*
3029
-----|--------|---

README.md

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
# StackViewLayout
2-
#### Captures
2+
1.支持布局预览、宽高比设置
3+
2.支持自动播放、左右布局
4+
3.支持缩放滑动、连续滑动
35

4-
![效果图]()
6+
#### Captures
7+
![效果图](images/image_normal) ![效果图](images/image_left) ![效果图](images/image_right)
58

69
### Use
7-
implementation 'com.uis:stacklayout:0.5.0'
10+
implementation 'com.uis:stackviewlayout:0.1.0'
11+
12+
### [老版本](README-StackLayout.md)
813

914
*Name*| *Descript*|*Value*
1015
-----|--------|---
11-
stackSpace|间距(space)|默认值(default):10dp
16+
stackEdgeModel|层叠位置(stack model)|left/right
1217
stackEdge|边界距离(edge)|默认值(default):10dp
13-
stackZoomX|x方向缩放(x zoom)| 0<x<=1,1表示等间距,默认值(default):1
14-
stackPadX|x方向偏移(x padding)|表示偏移间距,默认值:0
15-
stackPadX|PadX*(Size-1) < Space|PadX优先级高于ZoomX
16-
stackZoomY|y方向缩放(y zoom)| 0<y<=1,1表示和顶层等高度,默认值:0.9
17-
stackLooper|自动轮播(looper)|false/true
18+
stackPaddingX|x方向偏移距离|10dp
19+
stackOffsetX|x方向偏移因子|2dp
20+
stackPaddingY|y方向偏移距离|10dp
21+
stackOffsetY|y方向偏移因子|2dp
22+
stackAutoPlay|自动轮播(looper)|true
1823
stackSize|层叠数量(stack size)|3
19-
stackEdgeModel|层叠位置(stack model)|left/right
24+
stackAspectRatio|宽高比,宽度须有值|0
2025

2126
### License
2227

demo/src/main/java/com/uis/stackviewlayout/demo/activity/StackAdapter.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ public void onClick(View v) {
9999
}
100100
}
101101

102+
@Override
103+
public void onPageSelected(int position) {
104+
Log.e("xx","page="+position);
105+
}
106+
102107
@Override
103108
public int getItemCount() {
104109
return stackData.size();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
stack:stackAspectRatio="2"
88
stack:stackPaddingX="15dp"
99
stack:stackOffsetX="2dp"
10-
stack:stackPaddingY="10dp"
10+
stack:stackPaddingY="15dp"
1111
stack:stackOffsetY="3dp"
1212
stack:stackEdge="10dp"
1313
stack:stackSize = "3"
14-
stack:stackAutoPlay="false"
14+
stack:stackAutoPlay="true"
1515
stack:stackModel="left">
1616
</com.uis.stackviewlayout.StackViewLayout>

images/image_left.jpg

99.1 KB
Loading

images/image_normal.jpg

118 KB
Loading

images/image_right.jpg

103 KB
Loading

0 commit comments

Comments
 (0)