2 Replies - 231 Views - Last Post: 15 May 2019 - 01:07 PM

#1 genericname   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 09-May 19

How can a non-parent activity communicate with a GridView?

Posted 14 May 2019 - 06:47 PM

On button click within "activity2", my gridview cells need to either show or hide an image (some on some off, depending on activity2's actions). What direction should I go to achieve this? LiveData? EventBus? SQLite and notifiyDataSetChange? How should I implement it? Thanks for pointing me in the right direction!

Posted Image
Is This A Good Question/Topic? 0
  • +

Replies To: How can a non-parent activity communicate with a GridView?

#2 ben255   User is offline

  • D.I.C Addict

Reputation: 44
  • View blog
  • Posts: 528
  • Joined: 09-September 13

Re: How can a non-parent activity communicate with a GridView?

Posted 15 May 2019 - 03:41 AM

https://stackoverflo...761276#37761276

think this will work for you, you might need to modify it to your liking but this will give you a activity > fragment and fragment > activity communication. I think you will have to communicate with the frag3 from the activity that will in turn handle the grid view
Was This Post Helpful? 1
  • +
  • -

#3 genericname   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 10
  • Joined: 09-May 19

Re: How can a non-parent activity communicate with a GridView?

Posted 15 May 2019 - 01:07 PM

Thanks ben! I'm messing around with it right now.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1