Watch This Now!

SimpleDrawerListener vs no-op: memory efficient listener

54 posts
Thanks Meter: 5
By surlac, Member on 23rd August 2014, 10:35 PM
Post Reply Subscribe to Thread Email Thread
I'm implementing a listener for DrawerLayout and found that SimpleDrawerListener class is more memory efficient than implementing your own via DrawerListener interface.
According to one of the books:

"DrawerLayout.SimpleDrawerListener offers the default (no special options) implementation of each of the DrawerListener callback methods. Use this if you are just accessing the core functionality of the UI DrawerLayout class as it provides simpler, more memory efficient code."

For example, I need only 1 method from 4 available in DrawerListener.
How extending SimpleDrawerListener and overriding this particular method can be more memory efficient than implementing interface and leaving 3 methods empty? What can be more "memory efficient" than empty method?
Post Reply Subscribe to Thread

drawer, memory

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes