Skip to content
0:00 / 0:00

#android#androidx#fragment

La Kopi @ Developer Space: Mobile Development - AndroidX: Recent Movement in Activity and Fragment

Google Developers Space

8.2K subscribers • 1 video on Hallway

YouTube
  • Recommended by 1 person: 1 on Stack Overflow and its sister sites.
  • Presented by Toru Wonyoung Choi, Senior Android Developer at Singapore Tourism Board
  • May be out of date. The tools, versions or practices it shows have likely moved on.

Intermediate. Assumes working knowledge.

1.2K views6 years ago1 recommendation

Mobile developmentAndroid and Jetpack ComposeMobile app architecture

Toru Wonyoung Choi discusses recent improvements to Activity and Fragment APIs in AndroidX, including FragmentResultListener.

La Kopi @ Developer Space is a monthly open mic night for the developer community to learn, connect, and be inspired by each other. Every month, a tech theme is selected and developers submit their topics to be shared with the community. Name: Toru Wonyoung Choi, Senior Android Developer, Singapore Tourism Board Topic: AndroidX: Recent Movement in Activity and Fragment Many improvements to Activity and Fragment APIs have been introduced via AndroidX packages, giving developers a new way to work with Android development. In this session, find out how Activity and Fragment have changed in AndroidX. Be our next La Kopi Speaker → goo.gle/devspace-speakers For more updates on upcoming events, follow us on social media: ✉️ Newsletter → goo.gle/devspace-news 👤 Facebook → goo.gle/devspace-fb 🐦 Twitter → goo.gle/devspace-twitter 🔴 Meetup → goo.gle/devspace-meetup

Why it's here

1 person recommends this

What people say. Recommended for learning how to use FragmentResultListener to pass data or communicate between Android fragments.

Moments people linked to

Sam Chenon Stack Overflow • Recommends

On “Is there a way to pass a function reference between activities?”

2022 Update: My original approach has a drawback, in my demo if I press the home button to put the app into the background, it will crash with NotSerializableException . Actually there is another API just for listening changes from one Fragment in the other, that is FragmentResultListener , offical tutorial is here: link to this video. If FragmentResultListener cannot meet your need, Shared ViewModel is the final solution in there: link to this video. 1. You need to add id 'kotlin-parcelize' to your build.gradle (app), like this: plugins { id 'com.android.application' id 'kotlin-android' id 'kotlin-kapt' id 'kotlin-parcelize' //here } 2. Create a Class to wrap your Lambda function: @Parcelize…
13View the answer