Answer the question
In order to leave comments, you need to log in
Is it possible to connect one fragment in two activities at the same time?
There is MainActivity, 2 FragmenActivities are built into it via FragmentPageAdapter. Is it possible to somehow insert the same fragment inside the containers of these two activities at the same time?
I'll explain why, can you recommend any other way. In the fragment that needs to be hooked up, there is a table of speeds, a field for displaying the current set speed, and a SeekBar for emulating movement. It is necessary that in both activities the set speed is synchronized.
Answer the question
In order to leave comments, you need to log in
It seems to me that you are confusing something ─ only one Activity can be active at a time, maybe MainActivity has a viewpager with two fragments? Or just two fragments?
What's stopping you from passing a speed value from one fragment to another?
There are many solutions, which one is better depends on your task and architecture, I'm not sure that I correctly understood what is happening with you and what you want to do.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question