Peter TörnhultinProAndroidDevHacking the Compose Bottom sheetWorking with the ModalBottomSheetLayout in Jetpack Compose tab navigation can be challenging. Here’s a solution that worked pretty well.Feb 6, 20233Feb 6, 20233
Peter TörnhultinProAndroidDevImproving the Compose DropdownMenuWhen migrating to Compose you may have come upon the DropdownMenu or the ExposedDropdownMenuBox + ExposedDropdownMenu. These APIs provide…Feb 1, 20233Feb 1, 20233
Peter TörnhultinProAndroidDevAnimated Selector in Jetpack ComposeAre you migrating to Compose but can’t get your AnimatedStateListDrawables to work? Here’s a solution that worked pretty well for me 👍Jan 23, 20232Jan 23, 20232
Peter TörnhultinProAndroidDevKotlin Inline Classes in an Android WorldThe Kotlin Inline (Value) class is a relatively new feature of the Kotlin language as it recently got a stable release in Kotlin 1.5. I…Nov 17, 20216Nov 17, 20216
Peter TörnhultinProAndroidDevLiveData transformationsLiveData is a great tool to use when working with Android Architecture Components. Before I knew how to use the Transformations class, I…Jun 3, 20202Jun 3, 20202
Peter TörnhultinProAndroidDevHow to unit test Room: runInTransactionIn case you have tried writing Unit tests for your application business logic but gotten stuck at testing your Room logic where some…Aug 21, 20191Aug 21, 20191
Peter TörnhultinProAndroidDevTesting Custom Views with Robolectric 4This is a short tutorial/intro on how to set up and use Robolectric to create Component tests for your custom views. If you‘re not…Mar 31, 20193Mar 31, 20193
Peter TörnhultLifecycle & Fragments backstackLiveData and ViewModel are two awesome new additions to the Android toolbox. The examples are straight forward, but unfortunately they…Aug 29, 20171Aug 29, 20171