Wednesday, March 27, 2013

Android: How to compare Drawables


Answer:

  drawable1.getConstantState().equals(drawable2.getConstantState());

It doesn't compare actual data (bytes of images) so it is fast and memory efficient.

No comments:

Post a Comment