In this mini-Fragment episode, Donn talks about Item #12 of the Effective Java series – Consider Implementing Comparable. You’ll learn about how you can use the Comparable interface to give your code the extra sorting boost it needs. Work with Arrays.sort(), Collections utilities and even sorted data structures. Donn breaks down what it takes to implement the compareTo method of the Comparable interface.
The age old question: should I be using an event bus today? What is an event bus? what are still some good use cases for an event bus? Can i replace an event bus with RxJava?
Donn and Kaushik have at it and try to answer this question that gets asked constantly in the AndroidDev circles. Listen on for our take.
What’s an event bus
- Donn’s blog post on event aggregators (event buses) [donnfelker.com]
- KG’s blog post on implementing an event bus with Rx [blog.kaush.co]
- Handling GCM messages in the foreground and background by Mark Hudnall [markhudnall.comm]
- KISS [wikipedia.org]
- Ep 53: Jake on RxJava 2 [fragmentedpodcast.com]
- RxRelays [github.com/JakeWharton]
- Diff change set for converting RxBus to an RxRelay [github.com/kaushikgopal]
- Caster.io EventBus course – Annyce Davis [caster.io]
We talk with Android UI magician Israel. In this episode, Israel does what magicians are never supposed to do, reveal those exciting magic tricks. He talks about tricks you can use in your Android apps to create a super slick UI, citing examples from Google Photos, Twitter and other apps.
Dazzle your Android users with these UI tricks.
- Israel’s last appearance on Fragmented (Ep 26) [fragmentedpodcast.com]
Smoke and Mirros
- Israel’s sample app [github.com]
- Slides (with animation demos) [photos.google.com]
- Google Photos Recycler View pinch to expand/shrink [photos.google.com]
- ClipChildren demo [photos.google.com]
- Utils method – traverse hierarchy and clip [photos.google.com]
- Tap image to show full screen [photos.google.com]
We talk with the all-star multi-talented GDE Chiu-Ki Chan about testing. Specifically, we dive into leveraging Mockito for your testing needs. What is Mocking, what is Stubbing, what are the different test doubles, how does mockito help with this? Listen on to find about that and some more interesting stuff on testing!
- Android Dialogs | youtube [youtube.com]
- 360|AnDev co-organizer | conference [360andev.com]
- Technically Speaking| newsletter [tinyletter.com]
fake SharedPreferences implementations from AOSP
- FakeSharedPreferences | fake in-memory SharedPreferences implementation [github.com]
- BridgeSharedPreferences | empty SharedPreferences that does nothing implementation [github.com]
- Testing SharedPreferences [gumroad.com]
Different kinds of Test doubles
- Know your test doubles [testing.googleblog.com]
- [Test Doubles: Mocks, Stubs, and More](https://www.objc.io/issues/15-testing/mocking-stubbing/ http://www.javaworld.com/article/2074508/core-java/mocks-and-stubs—understanding-test-doubles-with-mockito.html) [objc.io]
- Mocks aren’t Stubs [martinfowler.com]
- Mockito library [github.com]
- Stubbing consecutive calls [mockito.org]
- Argument Captor [mockito.org]
- PowerMock [github.com]
- friendspell | Chiu-Ki’s example project with a variety of testing strategies [github.com]
- Mock Application in Espresso for Dependency Injection [sqisland.com]
- Chiu-Ki’s caster.io courses on Testing | MockWebServer
In this mini-Fragment, Donn talks about Item #11 of the Effective Java series – Override clone Judiciously. You’ll learn about the extralinguistic behavior of clone and the Cloneable interface. Clone and Cloneable are very special, and this episode helps explain the nuances.