Howtodoandroid – Learn android by doing

  • Getting started with jetpack compose – Basic components

    Getting started with jetpack compose – Basic components

    Jetpack Compose is Android’s modern toolkit for building native UI. It simplifies and accelerates UI development on Android. Quickly bring your app to life with less code, powerful tools, and intuitive Kotlin APIs. To learn more about the jetpack compose internals, Please check the official documents. In this post, I am focusing on creating material […]

  • Android RecyclerView Item Animations in Kotlin [Example]

    Android RecyclerView Item Animations in Kotlin [Example]

    We are using recyclerview, for almost all of our android applications. It’s very useful to know about recyclerviews. in this post, I have explained all about animating recyclerview using the simple anim XML file. Steps to animate recyclerview items in android Create an animation XML file To create an animation XML layout, Create an anim […]

  • Dependency injection on Android with Hilt[Example]

    Dependency injection on Android with Hilt[Example]

    Dependency injection (DI) is a technique widely used in programming and well suited to Android development, where dependencies are provided to a class instead of creating them itself. By following DI principles, you lay the groundwork for good app architecture, greater code reusability, and ease of testing.  The new Hilt library defines a standard way to do DI in your […]

  • View Binding in Android Jetpack [Updated]

    View Binding in Android Jetpack [Updated]

    View binding is the current recommendation from the Google team for importing the views from XML to Activity, Fragment, or Adapter classes. View binding is a feature that allows us to write code that interacts with views. In most cases, view binding replaces findViewById. It supports both Java and Kotlin. To learn more about view binding check out the official documentation. […]

  • MVVM with Kotlin Coroutines and Retrofit [Example]

    MVVM with Kotlin Coroutines and Retrofit [Example]

    Coroutines are a neat new feature of the Kotlin language that allows us to write asynchronous code in a more idiomatic way. — This also means you can write asynchronous code the same way you would normally write synchronous code in your project. Already, I have explained MVVM in detail in another post. Please check that […]

  • How to run task with work manager in android ?

    How to run task with work manager in android ?

    WorkManager is one of the Android Architecture Components and part of Android Jetpack, a new and opinionated take on how to build modern Android applications. WorkManager is an Android library that runs deferrable background work when the work’s constraints are satisfied. Earlier we had AlarmManager, JobScheduler, and FirebaseJobDispatcher for scheduling the background tasks. But the […]

  • MVVM With Retrofit and Recyclerview in Kotlin [Example]

    MVVM With Retrofit and Recyclerview in Kotlin [Example]

    MVVM architecture is a Model-View-ViewModel architecture that removes the tight coupling between each component. Most importantly, in this architecture, the children don’t have a direct reference to the parent, they only have the reference by observables. What is MVVM? MVVM stands for Model, View, ViewModel. Model: This holds the data of the application. It cannot directly talk to […]

  • Material Menus – Material Component For Android

    Material Menus – Material Component For Android

    A menu displays a list of choices on a temporary surface. They appear when users interact with a button, action, or other control. Before getting into details. Check out my other post on material design, Progress Indicators – Material Components For Android Sliders – Material Component For Android Material Menus – Material Component For Android […]

  • How to get continuous location updates in Android

    How to get continuous location updates in Android

    In this post, I will explain how to update the live location to the server every some interval. For example, sending live location to the server every 1 minute. To fetch the live location we are using an android service to run in the background to fetch the location continuously within the given time interval. […]

  • Implementing Navigation Drawer In Android [Step By Step]

    Implementing Navigation Drawer In Android [Step By Step]

    The navigation drawer is used to navigate many screens or functionalities of the app by clicking on the ‘hamburger’ icon. Swiping from the left is also a way to bring the drawer into view, a screen then slides in, showing many items. You can click on these said items and go to those screens to […]

Got any book recommendations?