You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-24Lines changed: 32 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,7 @@
1
1
# DynamicStackAdapter
2
-
This library helps to achieve a stack behaviour for RecyclerViews. It includes a Builder which handles all the
3
-
creation and configuration of the Adapter. </br>
4
-
</br>
5
-
Keep in mind that scrolling is disabled because it would interfere with the Drag&Drop mechanics.
2
+
This library helps to achieve a stack behaviour for RecyclerViews. The user can move, delete and resize the items on the stack if desired. It works with the standard RecyclerView from the android support library.</br></br>
To configure the Dynamic Stack Adapter you should use the DynamicStackBuilder class. The following example shows
28
-
a minimum configuration of the RecyclerView
27
+
You should use the DynamicStackBuilder class to set up the stack behaviour. This Library works without it but using the Builder makes the configuration process less complicated and configures the used RecyclerView appropiately. The following example shows a minimum configuration of the RecyclerView through the Builder:
@@ -35,47 +34,56 @@ final MyAdapter adapter = (MyAdapter) new DynamicStackBuilder()
35
34
.build();
36
35
```
37
36
You need to provide your own DynamicStackAdapter and DynamicStackViewHolder as well as a layout for the item views. Your custom Adapter
38
-
needs to extend the DynamicStackAdapter and you need to specify your Item Type T and your custom DynamicStackViewHolder VH.
37
+
needs to extend the DynamicStackAdapter and you need to specify your Item Type T and your custom DynamicStackViewHolder VH. The withCreateViewHolder and withBindViewHolder methods can be implemented like usual.
//this method is called when the user resizes the item AND when a new item is added
69
75
}
70
76
71
77
}
72
78
```
73
79
And thats basically all you need to know.
74
80
1. extend DynamicStackAdapter and DynamicStackViewHolder and implement your own versions
75
-
2. run the builder
81
+
2. run the builder and set up your RecyclerView, DynamicStackAdapter and DynamicStackViewHolder
76
82
77
-
Through the builder you can customize the Adapter, ViewHolder and RecyclerView. All of the following commands are optional.
78
-
Most of them are self explanatory. You can read the documentation if anything is unclear. Default values will be used if you don't set those values yourself.
83
+
A working example can be found in the app folder.
84
+
</br>
85
+
As mentioned before the builder allows you to customize the Adapter, ViewHolder and RecyclerView. All commands are listed below.
86
+
Most of them are self explanatory but the documentation should provide more insight if anything is unclear. Default values will be used if the optional methods are not executed.
0 commit comments