V
V
Vitaly Robinovsky2016-04-18 16:42:08
Android
Vitaly Robinovsky, 2016-04-18 16:42:08

Choice of implementation interaction of fragments?

guys got a question. I use fragments in my application. The fragment has a button to move to another fragment. I implemented it using the interface (Processing an event from a fragment in an Activity, the code comes out in order more than the second way), well, I was also able to implement it directly without using the Activity using the usual button processing, which creates a fragment and changes it with the current one. Which of the methods is considered more correct and flexible?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Gamega, 2016-04-18
@gadfi

it all depends on your architecture, both methods have the right to life, as well as a number of other methods - whichever is more convenient and do it
more code not the mvp / mvvm metric even more code and nothing, use )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question