Ronin
Ronin

Reputation: 93

Android - display toast message in multiple fragments

I have two fragments (making using of a ViewPager). I would like to show a toast message in each of these fragments (separately).

Currently, when displaying the toast messages, they all appear on the "first" fragment. Can someone point me in the right direction please.

I will post the necessary/applicable code on request.

Upvotes: 0

Views: 336

Answers (1)

Blackbelt
Blackbelt

Reputation: 157457

Implements View.OnPageChangeListener from your own ViewPager and show the Toast when the onPageSelected is fired

Upvotes: 1

Related Questions