For example, in the class Fragment 1, there are various events [Spinner, Switch, SeekBar] and so on
Is there a way to put the initial values of these events together and put them in Message.obj and send them to another class [for example, I'll do Fragment2 here?]
Of course Fragment 1 is referring to Fragment 2.
class interface
What does Fragment 1 mean by referring to Fragment 2? I don't know if you don't know how to communicate between Fragments or how to communicate between Activities, so I'm answering two questions.
Communication between activities is possible through Intent. Refer to parcelble for object data communication via int.
Communication between Fragments is possible through Activity, which acts as a controller. The form of creating an interface in each fragment and implementing it in Activity. Please refer to the following link. Move link
I hope it was answered.
© 2024 OneMinuteCode. All rights reserved.