I have a fragment and I want to add its data to another fragment via getFragmentManager()
but this metod has been deprecated and now I don't know what to do.
Screenshot
Asked
Active
Viewed 124 times
-1

Janez Kuhar
- 3,705
- 4
- 22
- 45
-
What do you mean by 'add its data to another fragment'? A Fragment is a piece of UI. Are you saying you want to add a Fragment to another Fragment's layout? – ianhanniballake Jun 21 '21 at 21:43
-
Yes sir, that is exactly what I mean – Amir Senator Jun 21 '21 at 21:58
1 Answers
0
You can use FragmentActivity.getSupportFragmentManager(). Visit Since the Android getFragmentManager() API is deprecated, is there any alternative? for more details .

Aditya
- 91
- 4
-
-
https://stackoverflow.com/questions/38895333/how-to-use-getsupportfragmentmanager-in-activity/38895391 – Aditya Jun 22 '21 at 07:06
-
-
Happy to help!!..Please Up-vote the answer so that others can also find it. – Aditya Jul 01 '21 at 12:56