I have a Xamarin.Android and Xamarin.iOS app. The app has a data model called as PRODUCT. In various screens, we will list the products depending on queries or other criteria. Let's say that the user navigated from Activity-A (ViewController in ios) to Activity-B and further into C, D etc by selecting a specific product. Based upon the user interaction in Activity-D I need to update UI in all the other activities while navigating back from D to A . How can I propagate the changes down the back stack or how to update the UI accordingly while navigating back. The certain activity might contain the UI element directly in it while at other places its part of a list. The product will have a unique id.
How to propagate changes while back navigation in android and ios?
95 Views Asked by Midhun Kumar At
1
There are 1 best solutions below
Related Questions in XAMARIN.IOS
- Maui custom iOS picker renderer conversion
- My .net MAUI app works in debug mode, but "dotnet publish" doesn't work
- iOS 17.4.1 requestTrackingAuthorization returns Denied status always
- Xamarain support for IOS 17.4.1
- Xamarin iOS to MAUI .net8
- Could not create an native instance in Xamarin.IOS
- Xamrin forms iOS app no longer receiving FCM registration token after updating Xamarin.Firebase.iOS.CloudMessaging to 8.10.0.3 from 3.12
- Xamarin.iOS - Client.PairedDevices does not return the devices
- M24LR16E Drivers not being read with NFC on iOS
- How can I create a framewrok from a native iOS library?
- Implementing URL-encoded Form Data Submission in Xamarin.Forms WebView for iOS
- How to make monotouch.dialog work in .net maui
- Reading barcode in an ios application in .net8 without maui
- Using the community toolkit with xamarin iOS and Xamarin Android
- On Migrating Xamarin App to .NET MAUI App crashes on starting application again due to FFImageLoading.Compat
Related Questions in XAMARIN.ANDROID
- Extracting Last 4 Digits from RPM Response in Xamarin Android (e.g., "41 0C") and Performing Decimal Conversion and Division by 4
- Xamarin android emulate usb PC Keyboard
- Java.Lang.IllegalStateException: 'Unable to parse composition' using Lottie in splashscreen xamarin forms (android)
- AzureDevops Pipeline Generate APK: Error XALNK7000: Mono.Linker.MarkException
- Unable to clear App cache in Xamarin.Forms Android
- Xamarin Android Memory Usage
- Failed to resolve SDK 'Microsoft.NET.Sdk'
- Why are there no results after clicking button even though event handler is initiated and button_click method created?
- How to perfectly localize DatePicker, TimePicker in Xamarin
- .Net Android (Maui) Writing external storage doesn't work until I restart the application in below 13 version
- Syncfusion/Xamarin Numeric Keyboard broken - 2 different characters within the same button
- Alarm manager does not trigger broadcast receiver when app is closed
- ExtendedListView not scrolling to correct position
- Can not resolve reference 'Package' referenced by 'Project.Android', when updating a new package in an existing project
- How to make a row in a list after clicking a buttom xaml
Related Questions in BACK-STACK
- How do I synchronize between Jetpack Compose navigation backstack and the selected state of the icon of Navigation bar
- How to clean the memory back stack in profile on android app
- How avoid the backstack entries in dialog fragment
- Compose Navigation destination animation transitions by conditional
- Android Jetpack Compose Nested Navigation Backstack Behaviour
- Opening custom chrome tab destroys the caller Activity in Android version prior to 12
- Android 11 navigation and the back stack
- In Android, what's the difference between "backstack" and "task"?
- How to direct user back to the app screen from webView by using onBackPressed (Kotlin)?
- Android multi activity/multi fragment app, how to allow back button to pop backstack and not quit activity?
- Will Pop Scope is not working on video player screen in flutter
- is this possible to enable/disable backstack of particular item in bottom navigation view?
- How can I control navigation and backStack from main activity
- Navigation Controller: how to insert a fragment in the back stack
- Android deep link nested activity back stack not working
Related Questions in POPVIEWCONTROLLER
- Pop single view on each tab tap
- popViewController after dismiss Modal VC Swift
- Change a list of presented view controllers in swift like
- Swift: How to pass data when popping view controller
- Cart count not updating in navigation bar while popViewController in swift
- reloading data/refreshing data in parent ViewController
- Show UIView When Popping Back on a Navigation Controller
- How to dismiss viewcontroller and pop to root viewcontroller swift?
- popViewControllerAnimated: called on UINavigationController while an existing transition or presentation is occurring
- Pass data to previous viewcontroller VIPER
- popViewController and then immediately present an alert controller
- (Swift) popping back to navigation controller
- Pop to next viewController in ios
- iOS 13 and UINavigationBarDelegate::shouldPop()
- Why TableView does not reload data after popViewController?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Solution:
For Xamarin.iOS:
There are several ways to pass data between ViewControllers. Here I recommend you to use
NSNotificationCenterin your case. For example, if you want to changeA,B,C'sUI when you do some specify action inD, you can use the code below:In the controller
D: post aNotificationin your specify action,you can add your personal requirments(for example:product ID, UI style) in dictionary(the third parameter):In the controller
A,B,C, register as the observer of theNotificationwhich namedchangeUI.So, once the controller
Dpost aNotificationnamedchangeUI, all the observer will receive theNotificationand perform the function predefined(Here isdoChangeUI). You can get your personal requirments in thedict(notification.UserInfo) and update UI in the controllers.You can refer: NSNotificationCenter
For Xamarin.Android:
You can use
Broadcast-Receiversin Xamarin.Android. It's almost same as NSNotificationCenter in Xamarin.iOS.1.Creating a
Broadcast Receiverin ActivityA,B,C;2.Publishing a
Broadcastin ActivityD;3.Do your stuff when you received the broadcast
You can refer to the document for more detail:broadcast-receivers