Skip to content

Commit ef5d0a5

Browse files
author
uis
committed
demo
1 parent dd3f6e0 commit ef5d0a5

4 files changed

Lines changed: 9 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<li>注释:此图解释参数意义,展示效果不太精确,图片真实宽度为**上层橙色**
1414

1515
### Use
16-
implementation 'com.uis:stacklayout:0.3.0'
16+
implementation 'com.uis:stacklayout:0.3.1'
1717

1818
*Name*| *Descript*|*Value*
1919
-----|--------|---
@@ -94,6 +94,7 @@ stackEdgeModel|层叠位置|left/right
9494
0.2.0|只有一个元素,不支持轮播和滑动|新增功能
9595
0.2.1|减少child层级,见child.measure()|新增功能
9696
0.3.0|增加联动效果(缩放+平移)|新增功能
97+
0.3.1|联动动画平滑过度|fixed
9798

9899
### License
99100

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ buildscript {
44

55
repositories {
66
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
7+
google()
78
jcenter()
8-
google()
99
}
1010

1111
dependencies {
@@ -18,8 +18,8 @@ buildscript {
1818
allprojects {
1919
repositories {
2020
maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
21+
google()
2122
jcenter()
22-
google()
2323
}
2424
}
2525

demo/src/main/java/com/uis/stackview/demo/activity/MainActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ protected void onCreate(Bundle savedInstanceState) {
8383
recyclerView.setLayoutManager(new LinearLayoutManager(this));
8484
recyclerView.setAdapter(new StackAdapter());
8585
//stackViewLayout.setStackLooper(true);
86-
stackViewLayout.setPosition(10);
86+
//stackViewLayout.setPosition(10);
8787
stackViewLayout.setAdapter(new StackLayout.StackAdapter() {
8888
@Override
8989
public View onCreateView(ViewGroup parent) {
@@ -103,7 +103,7 @@ public void onBindView(View view, int position) {
103103

104104
@Override
105105
public int getItemCount() {
106-
return dataList.size();
106+
return 5;//dataList.size();
107107
}
108108

109109
@Override
@@ -114,8 +114,8 @@ public void onItemDisplay(int position) {
114114
@Override
115115
public void onItemClicked(int position) {
116116
Log.e("xx","clicked = " + position);
117-
stackViewLayout.setStackLooper(false);
118-
stackViewLayout.setPosition(position+3);
117+
//stackViewLayout.setStackLooper(false);
118+
//stackViewLayout.setPosition(position+3);
119119
}
120120
});
121121
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<androidx.viewpager.widget.ViewPager
1212
android:id="@+id/viewPager"
1313
android:layout_width="match_parent"
14-
android:layout_height="150dp"
14+
android:layout_height="100dp"
1515
android:clipChildren="true"
1616
android:clipToPadding="false"
1717
android:paddingRight="80dp"

0 commit comments

Comments
 (0)