Peter Törnhult

> Profile

https://se.linkedin.com/in/petertornhult


> Knowledge & Sharing

Blogger @Medium

Coder @GitHub

Contributor @StackOverflow

App developer @GooglePlay


> Companies

ASSA ABLOY Bontouch BookBeat Klarna SEB SJ UR


> Uptime


> Lang

Swedish, English


> Location

Stockholm, Sweden | Prague, Czech Republic


> _

Portfolio

> Expertise

“I help teams modernize and scale their mobile apps by improving architecture, performance, code quality, and development workflows — while coaching teams and lifting their technical capability.”

> Where I Deliver the Most Impact


> Projects

SJ

At SJ, I played a key technical role in a major multi-year app and backend migration. I took lead responsibility on the technical side by driving decisions, safeguarding app quality, and supporting the team’s daily work. I successfully managed this under a tight 2-year deadline with constantly shifting variables, dependencies, and cross-team coordination. I improved the Android app and the microservices, mentored developers, introduced Kotlin to multiple teams, and strengthened architecture and security across the organization.

Bookbeat

At Bookbeat, I improved the overall app experience by optimizing the UI, implementing new features, and modernizing the codebase. I migrated legacy Java/Rx code to Kotlin with Coroutines, helped modularize the app, and pushed clean architecture practices throughout the Android team to create a more maintainable and scalable product.

UR

At UR, I modernized the entire Android app by converting it fully to Kotlin, introducing a unified coding style, and improving pipelines and test stability. I modularized the codebase, rebuilt the audio/video player with clean and testable architecture, delivered multiple new features, and supported other developers through mentoring and knowledge sharing.


> Blogs


7 Pro tips for working with Android XML Layouts

Practical tips to keep Android XML layouts clean, maintainable and performant — avoid hard-coded values, flatten view hierarchies, use appropriate ViewGroups, resource-prefixing, formatting and previews.

Hacking the Compose Bottom sheet

How to work around challenges using ModalBottomSheetLayout with tab navigation in Jetpack Compose — a practical solution to a tricky UI case.

Improving the Compose DropdownMenu

Techniques for making dropdown menus in Jetpack Compose more robust, predictable, and user-friendly when migrating from older UI paradigms.

Animated Selector in Jetpack Compose

How to recreate AnimatedStateListDrawable-style behavior in Compose for animated selectors during migration from XML UIs.

Testing Custom Views with Robolectric 4

A walkthrough for testing Android custom Views without a real device using Robolectric 4 — reliable and fast component-level tests.

Lifecycle & Fragments backstack

Explaining ViewModel & LiveData behavior with fragment backstack navigation and presenting a clean workaround for restoring views safely.

Kotlin Inline Classes in an Android World

An explanation of Kotlin inline/value classes, when to use them, and how they fit into Android architecture and performance constraints.

LiveData transformations

Understanding map, switchMap, distinctUntilChanged, and MediatorLiveData for clean reactive stream transformations inside ViewModels.

How to unit test Room: runInTransaction

A practical guide for properly testing Room database operations using runInTransaction for safe execution and predictable test behavior.

Beware of Kotlin Runtime bugs (Converting Java to Kotlin)

An overview of subtle runtime pitfalls when converting Java code to Kotlin — invaluable for teams migrating legacy Android apps.

Technology

> Mobile Development


> Web & Fullstack


> Architecture & Backend


> Cloud & DevOps


> Leadership & Process


> Programming Languages

Recommendations

Your recommendations…

Copyright © CodeUnlimited