I have Activity A that holds 2 fragments. B and C B gets data from the Activity using Bundle. this fragment shows Subcategories of some products.
C shows products of the main category. so if the main category contains 100 items. this fragment shows them all.
so let's say B fragment shows 5 subcategories of the main category. and C shows all the items of the main category. I wanna know how when a subcategory is pressed from fragment B to send a string to fragment C and filter the items to show only the items related to that subcategory. so instead of showing 100, it shows 20 items corresponding to that subcategory that's pressed.
how to send this string to the C fragment and how to catch this event in the C fragment. every time subcategory is pressed. the items are filtered.
Note: using RecyclerView and MVVM.