Its a small example with Custom Employee object is sent from one Fragment to another.

Overview

Kotlin-SafeArgs-Custom-Object

Its a small example with Custom Employee object is sent from one Fragment to another.

Dependencies used

//    Navigation Component
    implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
    implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'

In the Plugins section the gradel file you will need to add following details

  id 'androidx.navigation.safeargs.kotlin'
  id 'kotlin-parcelize'

In the build.gradel for project under the dependencies section you will need to add the following

classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0"

So finally build.gradel for project will look as follows

dependencies {
        classpath "com.android.tools.build:gradle:7.0.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
        classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

and

build.gradel for Module

plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'androidx.navigation.safeargs.kotlin'
    id 'kotlin-parcelize'

}

Home Screen

alt text

Here as you can see when we add the employee details and click on the "send data" button the details will be sent from homke screen to details screen

Home Screen

alt text

Here as you can see, the information added from home fragments are sent to the details fragment

You might also like...
This application is an example of how to create menu on android platform.
This application is an example of how to create menu on android platform.

HW_Menu This application is an example of how to create menu on android platform. Table of Contents Introduction Screenshots Resources Contact Introdu

Example of combination recommended by Google libraries

Project description This project includes several widely used libraries and shows how to deal with them in connection. Project created as multilayer p

Spring Native Bookcase Backend Example

Spring Native Bookcase Backend Example Simple example for bookcase backend. Saves bookcases and list them (simple CRUD). set database connection prope

PolitcalPreparedness is an example application built to demonstrate core Android Development skills recommended by Google.

PolitcalPreparedness is an example application built to demonstrate core Android Development skills recommended by Google.

This application was created internally for Aseman Company to evaluate the performance of its employee
This application was created internally for Aseman Company to evaluate the performance of its employee

AsemanTile-HRM This application was created internally for Aseman Company to evaluate the performance of its employees Uses Each of the managers of th

Server Sent Events (SSE) client multiplatform library made with Kotlin and backed by coroutines

OkSSE OkSSE is an client for Server Sent events protocol written in Kotlin Multiplatform. The implementation is written according to W3C Recommendatio

OpenPacketSniffer - Monitors and handles network packets sent and received to/from a host

Packet Sniffer Monitors network activity and logs all packets that have been sent/received by the client's host. Settings In Main.kt, the PcapHandler

Minimal example of how to safely share a file produced by a task in one project, with a task in another project.

How to share files across Gradle subprojects: A minimal example This is the Gradle project: . ├── producer │ └── build.gradle.kts ├── consumer │ └

A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).
A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

A small navigation library for Android to ease the use of fragment transactions & handling backstack (also available for Jetpack Compose).

Another-read-more-lib - Another read more library for android

another-read-more-lib 📖 Another read more library. Add it in your root build.gr

A TextView that automatically fit its font and line count based on its available size and content
A TextView that automatically fit its font and line count based on its available size and content

AutoFitTextView A TextView that automatically fit its font and line count based on its available size and content This code is heavily based on this S

Android Navigation Fragment Share Element Example: Use Share Element Transition with recyclerView Item and ViewPager2 Item.
Android Navigation Fragment Share Element Example: Use Share Element Transition with recyclerView Item and ViewPager2 Item.

Android-Navigation-Fragment-Share-Element-Example 说明 Android 使用Navigation导航切换Fragment中使用共享元素过渡动画的例子:将在listFragment的RecyclerView的Item共享元素过渡到pagerFragme

Migrating from one PostgreSQL to another via S3

Migrating from one PostgreSQL to another via S3 In one terminal start initial setup. ./gradlew buildDockerImage docker-compose up --build dbmig-s3 dbm

🗂 Yet Another One Way to Handle Your Dockerfiles with Kotlin

🐳 Dokker The Kotlin DSL to generate your project Dockerfiles with Kotlin. Example The library is created with one purpose: allow easy generation of m

Main goal of this project is to find the best route from one country to another

Route-service Main goal of this project is to find the best route from one country to another. Data is presented as json format. I've implemented A* p

A tool to convert unit tests from one standard to another

unit-test-exchange-maven-plugin This plugin works as a tool to convert unit test

A pair of applications provide a direct means of integrating with one another via application programming interfaces (APIs)

What is a native integration? It's when a pair of applications provide a direct means of integrating with one another via application programming interfaces (APIs). Once integrated, data can flow between the apps and become more readily available to your employees.

Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.
Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.

Video Transcoder Do you want to encode videos on your phone into different formats, trim videos, or extract audio? Are you looking for a free solution

Just another one easy-to-use adapter for RecyclerView :rocket:
Just another one easy-to-use adapter for RecyclerView :rocket:

Elementary RecyclerView Adapter Another one easy-to-use adapter for RecyclerView 🚀 Features: DSL-like methods for building adapters similar to Jetpac

Owner
Akshay Teli
Android Developer | Java | Kotlin | Python
Akshay Teli
ListView Example with custom Adapter Using Kotlin in Android Studio

Kotlin-ListView ListView Example with custom Adapter Using Kotlin in Android Studio Steps to follow : Build ListView with Custom Adapter in Kotlin Add

null 0 Nov 5, 2021
Small project on using Room + MVVM + data binding

healthinfo This is a demo project that utilizes Room Database, MVVM, Data binding, Repositories, Retrofit and more to build an app that reads content

Mohammad Ali Fouani 0 Nov 24, 2021
This is an example implementation of android accessibility services with 5 Sample Actions

Android Accessibility Services Example This is an example implementation of android accessibility services with 5 Sample Actions such as: Simulate Pow

Muhammad Fahriansyah 7 Jul 1, 2022
This is an example repository to demonstrate the good practices of using ViewModel and how usage of AndroidViewModel can make things worst in a codebase

ViewModel Good Practices ??‍♂️ This is a example repository to demonstrate the good practices of using ViewModel and how usage of AndroidViewModel can

Shreyas Patil 29 Sep 28, 2022
📌This repo contains the kotlin implementation of TensorflowLite Example Android Apps🚀

TensorflowLite Examples Kotlin This repo contains the kotlin implementation of TensorflowLite Example Apps here, which are mostly implemented in java

Sunit Roy 29 Jan 1, 2023
Example Android library project that works with jitpack.io

android-example Example Android library project that works with jitpack.io. See this Tutorial on how to publish an Android Library with JitPack. For m

Denys Denysenko 0 Dec 20, 2021
This example was built for lecturing proposes, it shows how to consume data from an API.

Android Kotlin NewsMobEDJDCM2122 Example - EDJD 2021/2022 This example was wirten during the Mobile Computing lectures in the course 'Lincentura em En

null 0 Nov 8, 2021
An example to show how a proper plugin for Lambda Client is set up

Lambda Plugin SDK This project in an example to show how a proper plugin for Lambda Client is set up. The advantage of plugins for a utility mod is th

KMatias 0 Oct 25, 2021
An example Android Application to test out Kotlin development in Adndroid

AndroidDiceGenerator This is an example Android Application to test out Kotlin development in Adndroid. On pressing a button, the application generate

Fredrick Ojure 0 Oct 28, 2021
ROOM Database Example with MVVM in Kotlin[Fragments,Navigation]

RoomDatabase_SampleApp Room Database Sample App Overview Of This Room Database Application In this app, we can do operation on room database | Insert,

RUHUL AMIN CHOUDHURY 0 Nov 3, 2021