GeezerVison is showing github.com — Update README.md · AndroidshadowX/Side-Menu.Android@1dc4c4c
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: README.md +16Lines changed: 16 additions & 0 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -126,6 +126,22 @@ And to add all items to menu you have to add all of them into `LinearLayout` |
126 | 126 | All menu items should implement `Resourceble` interface to get menu item name and drawable res |
127 | 127 | And all fragments should implement `ScreenShotable` to get screenshot of a fragment |
128 | 128 |
|
| 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 | + |
129 | 145 | #### Let us know! |
130 | 146 |
|
131 | 147 | 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. |
|