Skip to content

Commit 6c86bd9

Browse files
author
uis
committed
add swip
1 parent 1892e9d commit 6c86bd9

5 files changed

Lines changed: 179 additions & 93 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import com.uis.stackview.demo.entity.ItemEntity;
1717

1818
import java.util.ArrayList;
19+
import java.util.List;
1920

2021
import androidx.appcompat.app.AppCompatActivity;
2122
import androidx.recyclerview.widget.LinearLayoutManager;
@@ -28,7 +29,7 @@ public class MainActivity extends AppCompatActivity implements View.OnClickListe
2829

2930
private RecyclerView recyclerView;
3031
private StackLayout stackViewLayout;
31-
ArrayList<ItemEntity> dataList;
32+
List<ItemEntity> dataList;
3233

3334
@Override
3435
protected void onCreate(Bundle savedInstanceState) {
@@ -42,7 +43,7 @@ protected void onCreate(Bundle savedInstanceState) {
4243
dataList = StackAdapter.initDataList(this);
4344

4445
recyclerView.setLayoutManager(new LinearLayoutManager(this));
45-
recyclerView.setAdapter(new StackAdapter());
46+
//recyclerView.setAdapter(new StackAdapter());
4647
stackViewLayout.setAdapter(new StackLayout.StackAdapter() {
4748
@Override
4849
public View onCreateView(ViewGroup parent) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@
88
stack:stackEdge="20dp"
99
stack:stackZoom="0.08"
1010
stack:stackLooper = "true"
11-
stack:stackSize = "3"
11+
stack:stackSize = "15"
1212
stack:stackEdgeModel = "left">
1313
</com.uis.stackview.StackLayout>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
android:id="@+id/stacklayout"
55
android:layout_width="match_parent"
66
android:layout_height="wrap_content"
7-
stack:stackSpace="15dp"
7+
stack:stackSpace="10dp"
88
stack:stackEdge="20dp"
99
stack:stackZoom="0.08"
1010
stack:stackLooper = "true"
11-
stack:stackSize = "3"
11+
stack:stackSize = "12"
1212
stack:stackEdgeModel = "right">
1313
</com.uis.stackview.StackLayout>
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.stone.pile.libs">
1+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2+
package="com.uis.stackview">
23
</manifest>

0 commit comments

Comments
 (0)