Best of Jetpack Compose2024

  1. 1
    Video
    Avatar of philipplacknerPhilipp Lackner·2y

    The ONLY Correct Way to Load Initial Data In Your Android App?

    The post discusses various methods to load initial data in Android apps, evaluating three main approaches: using the Jetpack Compose launched effect, initializing in ViewModel's init block, and leveraging flow collection. Each method's benefits and drawbacks are examined, highlighting a newly preferred approach using flow collection for improved control and testing.

  2. 2
    Article
    Avatar of pandProAndroidDev·2y

    Creating Pixel-Perfect UI with Jetpack Compose

    Creating consistent UI across different Android devices can be challenging due to varying display resolutions and user-adjustable display settings. Jetpack Compose, combined with the 'aDp' library, offers a solution for achieving pixel-perfect UI. The library scales dimensions according to the device's settings, ensuring design consistency. It also includes 'aSp' for fonts to handle changes in text size settings.

  3. 3
    Article
    Avatar of streamStream·2y

    Jetpack Compose: The Android Developer Roadmap

    Jetpack Compose is the future of the UI toolkit in Android development. It includes components like Compose UI, State management, Side-effects, and CompositionLocal. You can migrate from XML to Jetpack Compose using practical APIs and modular libraries. Jetpack Compose also provides mechanisms to manage side-effects and pass data through the Compose tree. Stay updated with the Android Developer Roadmap series for more information.

  4. 4
    Video
    Avatar of philipplacknerPhilipp Lackner·2y

    Keyboard & Focus Management In Jetpack Compose - Android Studio Tutorial

    This tutorial covers focus and keyboard management in Jetpack Compose for Android. It explains how to create a smooth form-filling experience by automatically moving the focus to the next text field using IME actions, and submitting the form directly from the keyboard. Detailed steps are provided to implement these features programmatically.

  5. 5
    Article
    Avatar of pandProAndroidDev·2y

    The best way to load data in ViewModels

    Loading data into ViewModels is a complex task that involves managing states such as loading, success, and failure. A simplified and reactive approach is proposed using Kotlin's Flow and StateFlow. This method also includes handling data from memory, adding a refresh function, and dealing with side effects. The article provides a comprehensive solution with example code and a GitHub repository link for further reference.

  6. 6
    Article
    Avatar of medium_jsMedium·2y

    Modern Android Development in 2024

    This post discusses various topics related to modern Android development in 2024, including the use of Kotlin, key features of Jetpack Compose, architecture patterns, dependency injection, modularization, testing, in-app updates and reviews, security, loggers, Google Play Instant, AI coding assistants, and Kotlin Multiplatform.

  7. 7
    Article
    Avatar of andevAndroid Developers·2y

    Now in Android #100

    Android 15 is released with superior media capabilities, battery optimization, app performance improvements, and file integrity protection APIs. Android Studio Iguana is launched with new features. Cloud photos are now available in the Android photo picker. ML Kit Document Scanner API enables easy integration of document scanning capabilities. Wear OS hybrid interface extends battery life. Jetpack Compose introduces nested scrolling and strong skipping. Android Jetpack releases several updates including Compose Material 3 and Lint.

  8. 8
    Article
    Avatar of collectionsCollections·2y

    Jetpack Compose: New Features, Adaptive Layouts, and Code Efficiency

    Jetpack Compose unveils new features, improved performance, adaptive layouts, and code efficiency, revolutionizing native UI development.

  9. 9
    Article
    Avatar of asayerasayer·2y

    XML vs. Jetpack Compose: A Comparison

    This post compares XML and Jetpack Compose, two user interface development tools for Android mobile apps. It discusses their syntax, language, code structure, reactivity, learning curve, customization, adoption, community, integration, and use cases.

  10. 10
    Article
    Avatar of pandProAndroidDev·2y

    Design Server-Driven UI with Jetpack Compose and Firebase

    Server-driven UI (SDUI) is an architectural pattern reducing client-side logic by rendering UI components based on data received from the backend, enhancing flexibility and performance. Large companies like Airbnb and Netflix use this approach for consistency across platforms. SDUI helps in quicker updates without app releases, maintaining a consistent UI, and reducing the burden on mobile developers. However, it introduces challenges in terms of latency, performance, complexity, and cost. The post details the implementation with Jetpack Compose and Firebase Realtime Database, covering action handlers, component versioning, and more.

  11. 11
    Article
    Avatar of pandProAndroidDev·2y

    Jetpack Compose Previews: Delving Deep Into Their Inner Workings

    Jetpack Compose Previews enable rapid UI design iterations and can be run using `adb` without Android Studio. Understanding `PreviewActivity` and its role in hosting composables, as well as how to customize previews in multi-modular projects, can greatly enhance the development process. The guide provides detailed steps on generating and running instrumented APKs for previews and customizing preview behavior and appearance.

  12. 12
    Article
    Avatar of medium_jsMedium·1y

    A Developer’s Roadmap to Mastering Kotlin Multiplatform

    Kotlin Multiplatform (KMP) allows developers to share business logic across multiple platforms such as Android, iOS, Desktop, and Web, using Kotlin. It emphasizes code consistency and efficient development by enabling platform-specific UIs while sharing core logic. Tools like Compose Multiplatform, Ktor, and various Jetpack libraries enhance the ecosystem by offering solutions for UI, networking, and local storage. KMP's architecture involves defining and implementing shared and platform-specific code, leveraging Kotlin's coroutines for asynchronous tasks. The growing support from JetBrains and Google makes KMP a promising option for developers familiar with Kotlin.

  13. 13
    Article
    Avatar of jetbrainsJetBrains·2y

    Compose Multiplatform 1.7.0 Released

    Compose Multiplatform 1.7.0 by JetBrains introduces new components, performance improvements, and enhanced type-safe navigation. Key updates include Material3 components in common code, better touch interop on iOS, drag-and-drop support for desktop, and shared element transitions. Performance gains are notable on iOS with Kotlin 2.0.20, and resource handling has been improved across platforms.

  14. 14
    Video
    Avatar of philipplacknerPhilipp Lackner·1y

    I've Used Jetpack Compose For 4 Years - Here's the Good and the Bad

    The post discusses the author's four-year experience with Jetpack Compose, highlighting its advantages and disadvantages. Jetpack Compose is considered more enjoyable and efficient for building UIs compared to the traditional XML approach, making it easier to create reusable components and implement animations. However, challenges such as dealing with modifier order and side effects are noted. Despite its quirks, Jetpack Compose is seen as a significant improvement for Android development and is expected to become the primary way to build UIs in the future.

  15. 15
    Article
    Avatar of pandProAndroidDev·2y

    PDF Viewer using Coil

    Learn how to integrate a PDF viewer into your Android app using Coil. This guide covers creating a custom PDF decoder, adding it to the Coil configuration, and displaying PDF pages in activities or with Jetpack Compose. The approach leverages Coil’s extensibility for handling non-standard image formats efficiently.

  16. 16
    Article
    Avatar of pandProAndroidDev·2y

    Type Safe Bottom Navigation in Jetpack Compose

    This guide delves into the advanced concepts of Type Safe Bottom Navigation in Jetpack Compose. It explains how to use Serializable objects for navigation routes, thus eliminating the need for route build functions and navArguments. The guide covers setting up a BottomBar with three routes, handling active tabs, generating route patterns, and managing navigation routes with arguments. It simplifies navigation setup, ensuring type safety and enhancing readability.

  17. 17
    Article
    Avatar of androiddevAndroid Developers Blog·2y

    3 fun experiments to try for your next Android app, using Google AI Studio

    Discover how to use Google AI Studio and the Gemini model to enhance your Android app development. Learn to transform UI designs into Jetpack Compose code, fix UI issues with targeted prompts, and integrate new features like a recipe helper using simple AI prompts. The post highlights experimentation with AI, the importance of developer oversight, and encourages sharing and collaboration within the Android development community.

  18. 18
    Article
    Avatar of medium_jsMedium·2y

    SwiftUI and Jetpack Compose for Developers

    This post compares SwiftUI and Jetpack Compose for mobile app development. It covers topics such as the language, UI components, local storage, network/HTTP request, navigation, database/offline storage, IDE, community support, sample apps, and the learning curve.

  19. 19
    Video
    Avatar of philipplacknerPhilipp Lackner·2y

    Android Studio Ladybug, Compose/Fragment Interop & More - Philipp's Android News September 2024

    Philipp's Android News for September 2024 highlights several updates for Android developers, including the new Android Studio Ladybug with integrated Gemini AI assistant, which enhances coding by providing code transformations, documentation, and unit test generation. The update also improves interoperability between fragments and Jetpack Compose, making it easier to embed and test these UI components together. Additionally, new features for simulating sensor data and analyzing crash logs have been introduced, alongside support for Google Pixel 9 devices.

  20. 20
    Video
    Avatar of philipplacknerPhilipp Lackner·2y

    How to Navigate From ViewModels With a Custom Navigator - Android Studio Tutorial

    Learn a different approach to navigation in Android using a custom Navigator with Jetpack Compose. This method allows for easy global navigation from ViewModels without directly coupling them to NavControllers. It also simplifies UI testing by providing a Navigator interface that can be managed independently. The tutorial includes setting up dependencies, defining destinations, creating a Navigator interface, and integrating with Koin for dependency injection.

  21. 21
    Article
    Avatar of pandProAndroidDev·2y

    Mastering Navigation in Jetpack Compose: A Guide to Using the inclusive Attribute

    Jetpack Compose has transformed Android UI development with a modern, concise, and powerful approach. A critical feature for managing navigation between screens is the `inclusive` attribute within the `popUpTo` function. This attribute determines whether a specific destination should be removed from the navigation back stack, aiding in streamlined user flows. Practical examples include login flows, multi-step processes, and order cancellation, where using `inclusive = true` prevents users from returning to previous screens, enhancing the app's usability.

  22. 22
    Article
    Avatar of droidcondroidcon·2y

    Android App Bars vs Toolbars vs Other Bars, Explained

    Top and bottom bars in Android apps, including status bars, toolbars, and navigation bars, can often be confusing. This post clarifies their roles and functionalities. System bars are uniform across apps and managed by the phone's system. The top app bar provides app identity and navigation, changing dynamically with the screen. Android's ActionBar and Toolbar serve as top app bars with various customizations. Jetpack Compose introduces the TopAppBar for similar purposes, supporting the Material Design guidelines. The bottom app bar, including NavigationBar and BottomAppBar, offers key actions and navigation at the bottom of the screen.

  23. 23
    Article
    Avatar of pandProAndroidDev·2y

    Jetpack Compose: System UI Compatibility and Immersive Status Bar

    Learn how to achieve an immersive effect in Android using Jetpack Compose. Extend the application's drawing area into the System UI and set the background color of the System UI and page margins.