mirror of
https://github.com/leaf-wai/StackLayoutManager.git
synced 2026-07-12 19:01:21 +08:00
Update README
This commit is contained in:
17
README.md
17
README.md
@@ -24,7 +24,7 @@ If you're using Gradle, you can declare this library as a dependency:
|
|||||||
|
|
||||||
```groovy
|
```groovy
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.littlemango:stacklayoutmanager:1.0.1'
|
implementation 'com.littlemango:stacklayoutmanager:1.0.2'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -87,12 +87,23 @@ manager.setPagerMode(true or false);
|
|||||||
manager.setPagerFlingVelocity(3000);
|
manager.setPagerFlingVelocity(3000);
|
||||||
```
|
```
|
||||||
|
|
||||||
7. I use the DefaultAnimation class to provide animation, which is inherited from StackAnimation, and you can inherit both classes to achieve the desired animation effect:
|
7. You can add a item changed Listener to StackLayoutManager:
|
||||||
|
```
|
||||||
|
mStackLayoutManager.setItemChangedListener(new StackLayoutManager.ItemChangedListener() {
|
||||||
|
@Override
|
||||||
|
public void onItemChanged(int position) {
|
||||||
|
mToast.setText("first visible item position is " + position);
|
||||||
|
mToast.show();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
8. I use the DefaultAnimation class to provide animation, which is inherited from StackAnimation, and you can inherit both classes to achieve the desired animation effect:
|
||||||
```java
|
```java
|
||||||
DefaultAnimation animation = new DefaultAnimation(ScrollOrientation.BOTTOM_TO_TOP, visibleCount);
|
DefaultAnimation animation = new DefaultAnimation(ScrollOrientation.BOTTOM_TO_TOP, visibleCount);
|
||||||
manager.setAnimation(animation);
|
manager.setAnimation(animation);
|
||||||
```
|
```
|
||||||
8. I use the DefaultLayout class to implement the layout of items, which inherits from StackLayout. You can inherit both classes to achieve the layout effect you want:
|
9. I use the DefaultLayout class to implement the layout of items, which inherits from StackLayout. You can inherit both classes to achieve the layout effect you want:
|
||||||
```java
|
```java
|
||||||
StackLayoutManager manager = new StackLayoutManager(ScrollOrientation.BOTTOM_TO_TOP,
|
StackLayoutManager manager = new StackLayoutManager(ScrollOrientation.BOTTOM_TO_TOP,
|
||||||
visibleCount,
|
visibleCount,
|
||||||
|
|||||||
Reference in New Issue
Block a user