Answer the question
In order to leave comments, you need to log in
With an architect?
Hi Habr!
I thought for a long time whether this question is suitable here and in the end I came to the conclusion that I would try. So poke me with your nose if something is wrong.
A little background. I'm a master's student and what I'm doing now rarely requires beautiful architectural solutions in the code. However, since it won’t fit into my head on its own, I write something myself, where I try to implement what seems right to me in life.
So the situation is this. At the moment, I have the architecture of a piece of an application that I write in my spare time for android. It would be very, very cool to hear opinions on at least some points:
Answer the question
In order to leave comments, you need to log in
casts it to a concrete class
What if you do not make different subclasses of your ViewPager with different methods, but create one specific ViewPager class and implement the "Strategy" pattern. Depending on the event, your activity will pass to the resulting ViewPager class an instance of the Strategy class that implements the ConcreteStrategy algorithm for this event.
I have: an
activity, the essence of which I have defined for myself as “control everything”.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question