Activity and Fragments communication | Example code

Activity and fragment communication are important when you want to update data or action. You can do communication between Activity and Fragments using the interface. It’s required much time to pass data between activity and fragments or Fragments to fragments. Communication Fragments to Activity : The easiest way to communicate between your activity and fragments Read More…


Android Fragment Example in Kotlin | Code

Android Fragment is part of Android app UI or represents a behavior (DialogFragment,ListFragment)of the particular portion in an application. You can think of Fragments as module section UI or behavior of Activity with its own Lifecycle. In this tutorial, you will see Android Fragment Example in Kotlin. Come to the definition, You can use multiple fragments in Read More…


Share Data Between Fragments Used ViewModel Example

It’s very common in the Android application that two or more Fragments in an Activity need to communicate with each other. Let see a common case of master-detail fragments, where you have a fragment in which the user selects an item from a list and another fragment that displays the contents of the selected item. Read More…


Basic Communication between two fragments (Pass data)

Android Fragment represents a behavior or a portion of the user interface in an Activity (or in FragmentActivity). You can use multiple fragments in a single activity to build a multi-pane UI and can reuse a fragment in multiple activities. To Use fragments in android you have to build reusable and self-contained modular components. In the process, some Read More…


Creating and Using Android Fragments dynamically

Android fragments are the main component in android development, it’s added fragment component in Android 3.0 (API level 11), primarily to support more dynamic and flexible. Fragments are a usable portion of the user interface in an activity. In Activity, we can use multiple fragments. Fragments have their own life cycle, but its directly affected Read More…