035: All about Vector support on Android

In this mini Fragment we touch base on all the things you need to know about Vector drawables for Android development. How one can use it today, the recommended usage for vector drawable and formats, the limitations and everything else you need to know as an Android developer.

Download directly

Show Notes

Support library announcements

Animated Vector Drawable

Problems:

Other references:

Sponsor

Contact

034: Effective Java for Android Developers – Item #9

In this mini Fragment, we introduce Joshua’s ninth Item. After the last somewhat mind boggling item, this is a much welcomed simple, practical yet important one: Always override hashCode when you override equals.

Donn goes into the importance of implementing hashCode and why it’s so important to override it for maintaining harmony with the equals method. Also 42 and the answer to life ? He then goes into some tips on implementing a good hashCode and a standard recipe for the same.

Go forth and override them hashCodes!

Download directly

This episode is brought to you by Rollbar. Go to rollbar.com/fragmented to get their Bootstrap plan for free for 90 days. Stay tuned for more items from our “Effective Java for Android developers” Fragment series.

Contact

033: Talking Gradle with GDE Annyce Davis

In this episode we talk Gradle with the amazing and awesome Annyce Davis. We deal with the basics of Android’s build system and dabble with some tips on improving your build times.

Also we released our first ever Fragmented T-shirt in collaboration with another amazing GDE – Taylor Ling of AndroidTee fame.

Download directly

Show Notes

Annyce’s talks & videos:

Fragmented T-shirts

Contact

032: Making sense of Android Support Library version numbers

The Android Support library framework is the biggest boon to Android developers. But how does one makes sense of the different versions and revisions available? In this fragment we try to address that question.

Download directly

Show Notes

`

 ./gradlew -q app:dependencies    

 +--- com.android.support:design:23.1.1
 |    +--- com.android.support:appcompat-v7:23.1.1 (*)
 |    +--- com.android.support:recyclerview-v7:23.1.1
 |    |    +--- com.android.support:support-annotations:23.1.1
 |    |    \--- com.android.support:support-v4:23.1.1 (*)
 |    \--- com.android.support:support-v4:23.1.1 (*)

`

Contact

031: Effective Java for Android Developers – Item #8

In this mini Fragment, we introduce Joshua’s eighth Item. This one is a doozy, probably one of the longest items in the group of the effective Java series, but most definitely quite important.

This episode is brought to you by Rollbar. Go to rollbar.com/fragmented to get their Bootstrap plan for free for 90 days.

Download directly

Stay tuned for more items from our “Effective Java for Android developers” Fragment series.

Show Notes

Obey the general contract when overriding equals

When to not override equals:

  • Each instance of the class is inherently unique.
  • You don’t care whether the class provides a “logical equality” test.
  • A superclass has already overridden equals, and the superclass behavior is appropriate for this class.

The equals method implement an equivalence relation which states it must be:

  • Reflexive
  • Symmetric
  • Transitive
  • Consistent
  • For any non-null reference x, x.equals(null) must return false.

A recipe for a high-quality equals method is as such:

  • Use the == operator to check for references to this object.
  • Use the instanceof operator to check if the argument has the correct type 
  • Cast to the correct type.
  • Check all field types and corresponding field types.
  • Finally, when done, ask yourself – is this method symmetric, transitive and consistent?

Caveats

  • Always override hashcode when you override equals
  • Don’t be too clever!
  • Don’t substitute another type for Object in the equals declaration.

Contact