T
T
TikTak12362018-12-25 05:01:07
Android
TikTak1236, 2018-12-25 05:01:07

What is the best way to control Toolbar through Fragment?

I have one Activity and many Fragment and I have this question, each Fragment should have its own Toolbar or Toolbar should be only Activity and Toolbar should be controlled through Fragment.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ivanessence, 2018-12-25
@ivanessence

If the Toolbar has a different functionality for each fragment, then it is better to make its own Toolbar for each fragment and manage it through the fragment, because if you make one Toolbar in an Activity and constantly change it for each fragment, this is not convenient and will eventually lead to code obfuscation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question