Skip to content

Commit 1dc4c4c

Browse files
committed
Update README.md
1 parent 656d76d commit 1dc4c4c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,22 @@ And to add all items to menu you have to add all of them into `LinearLayout`
126126
All menu items should implement `Resourceble` interface to get menu item name and drawable res
127127
And all fragments should implement `ScreenShotable` to get screenshot of a fragment
128128

129+
You can customize icons that u place in the menu,or add mor items. Simply by changing the list you parse to view animator .For example:
130+
131+
```java
132+
133+
private List<SlideMenuItem> list = new ArrayList<>(); \\ the list of menu items
134+
135+
SlideMenuItem menuItem0 = new SlideMenuItem(ContentFragment.CLOSE, R.drawable.icn_close);
136+
list.add(menuItem0);
137+
SlideMenuItem menuItem = new SlideMenuItem(ContentFragment.BUILDING, R.drawable.icn_1); \\first parameter is the id of menu item,the second is the icon resouce
138+
list.add(menuItem);
139+
SlideMenuItem menuItem2 = new SlideMenuItem(ContentFragment.BOOK, R.drawable.icn_2);
140+
list.add(menuItem2);
141+
142+
viewAnimator = new ViewAnimator<>(this, list, contentFragment, drawerLayout, this);
143+
```
144+
129145
#### Let us know!
130146

131147
We’d be really happy if you sent us links to your projects where you use our component. Just send an email to [email protected] And do let us know if you have any questions or suggestion regarding the animation.

0 commit comments

Comments
 (0)