Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Phone SimpleDrawerListener vs no-op: memory efficient listener

OP surlac

23rd August 2014, 11:35 PM   |  #1  
OP Member
Thanks Meter: 3
 
36 posts
Join Date:Joined: Feb 2012
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:
Quote:

"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

Tags
drawer, memory
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes