Materialdrawer: Zebra Effect on Menu Items

Created on 14 Nov 2017  路  2Comments  路  Source: mikepenz/MaterialDrawer

Hi Mike again,

Is it possible to achieve the Zebra effect on menu items? So first is white, second green, third white...

Thanks again,
Matyas

question

Most helpful comment

If I want to do that I'd try to extend drawerItem class with custom view

All 2 comments

If I want to do that I'd try to extend drawerItem class with custom view

@MatyasK as @kaloglu already correctly pointed out. You'd need to create your own CustomDrawerItem which set a different background depending on it's position.

the viewHolder should have the adapterPosition which theoretically can be used. remember if you add a new item somewhere, you'll have to notify the whole adapter about changes as it wouldn't change the "zebra effect" otherwise.

(thanks @kaloglu for answering :) )

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jehad-suliman picture jehad-suliman  路  3Comments

kakai248 picture kakai248  路  4Comments

ghost picture ghost  路  3Comments

fuentepa picture fuentepa  路  3Comments

jd-alexander picture jd-alexander  路  4Comments