
But vice versa or passing data from both the fragments can also be made using the same given approach. In this blog, I will pass data from Fragment 2 to Fragment 1 only. For passing data between multiple fragments of different activities, refer to. The blog will solve the difficult task of communication between two fragments of a single activity. This blog contains the work done by me in the Lux Meter instrument of the PSLab Android app of passing data from LuxMeterConfiguration fragment to LuxMeterData fragment as shown in the featured image to set the high limit for the pointer and to set the update period of the Lux Sensor. The blog will mainly include the demonstration of passing values between fragments while using BottomSheet Navigation as done in PSLab Android application. This blog demonstrates how to pass values of a variable between two fragments of a single activity.
