1

I've asked a similar question few days ago here. I was trying to change the coordinates of a rectangle( rect in view class,onDraw method)that draws on Fragment 1 , from Fragment 2, so im trying to send a bunch of integers from a fragment(fragment2) which isn't the host of Rectangle class. I uploaded my code and didn't get any proper solution and they told me i was approaching it the wrong way.I asked a general question and I only need a general answer does anyone know a strategy to solve this or any website on this topic? thank you

sorry if it's too long I just wanted to make sure it's clear.

1 Answers1

0

Try to use interface. Define interface in fragment2 and define on click method in your , implement it in host activity then just change something in fragment1 using interface callback in host activity.

Leontsev Anton
  • 727
  • 7
  • 12