sonpx
sonpx

Reputation: 27

How to communicate between FragmentTabHost and Activity?

I have a Fragment add to an activity. In Fragment, I declare a FragmentTabHost with some TabSpec. How can I communicate between TabSpec and Activity?

Upvotes: 0

Views: 276

Answers (1)

GvSharma
GvSharma

Reputation: 2670

Tab host means in that you are using fragment only na, so you are asking how to communicate between fragment and activity.? For this create an interface and create an abstract method in it. extends your activity with this interface and implement the method.and in fragment also call the abstract method and write your code. if you have still doubts just refer this example. Android communication between activity and fragment hope this helps

Upvotes: 1

Related Questions