/android_basic_single_activity_fragments

Android single activity with multi fragment example

Primary LanguageKotlinApache License 2.0Apache-2.0

Single activity with multiple fragments, ViewModel, data binding, LiveaData and Jetpack Navigation

This app contains an order flow for cupcakes with options for quantity, flavor, and pickup date. The order details get displayed on an order summary screen and can be shared to another app to send the order.

This app demonstrates multiple fragments in an activity, a shared ViewModel across fragments, data binding, LiveData, and the Jetpack Navigation component.

Pre-requisites

  • Familiar with activities and fragments
  • How to use styles and themes in the UI
  • Basic understanding of Jetpack architecture components including ViewModel and LiveData
  • Data binding and binding expressions
  • Kotlin syntax basics

Getting Started

  1. Install Android Studio, if you don't already have it.
  2. Download the sample.
  3. Import the sample into Android Studio.
  4. Build and run the sample.

Screens

Post

https://www.codexpedia.com/android/android-single-activity-with-multiple-fragment-architecture/

Original source

https://github.com/google-developer-training/android-basics-kotlin-cupcake-app