Session

Android(MMX) X : 3 Tips for a better life

Well, I wanted to make sure you know those 3 patterns tips that will enhance your daily coding.
One is concerning AndroidX, and more precisely JetPack architecture (View, ViewModel, Repo, Room, LiveData, KotlinCoroutines). Because I want to give you the important and stupid tip for yours COLUMN_NAME in the room database and show you how to create the exact SQL query your view needs. But to understand this tip, we need to understand deeply the “new” Android JetPack way to do. And I will explain it in few slides because it’s deeply simple in fact.
Second concerns I want to talk with you is the TransitionManager and your xml layouts (ConstraintLayout). Because it’s so excellent to see the view getting animated depending on its state. I want to show you a simple and clear technics to create this effect with few lines of code and the knowledge you already have. Just a new way to use it (your knowledge) to create awesome visual effects. (Believe me, 3 lines)
[Animation example] https://www.youtube.com/watch?v=D7fLaXJd-T4
And last topic, for me, the biggest pattern discovery I did in Android in the last 2 years: ActivityAddon and its GRootActivity. It’s a simple way to avoid code replication and inheritance with your activities or fragments and being able to reuse the feature.
Let’s take one example: Suppose you display several GoogleMap in your application in different Activities (or Fragments). Do you duplicate the code in each activity? Or do you create inheritance between your activities? Let me show you and explain a third way to make it without neither inheritance neither code duplication. I’ll end by showing you how to use this pattern for toolbar, navdrawer, menuitem or whatever you need… No inheritance hell No duplication code hell.
So 3 little simple tips to change your way to code that can be resumed by:
Simplicity, Simplicity and Simplicity but awesome results.

mathias seguy

Android Craftsman, Expert and Team Leader at Android2ee

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top