53

Android策略设计模式进阶-Android探索

 5 years ago
source link: http://blog.51cto.com/14009815/2344255
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
策略模式定义了一系列的算法,并将每一个算法封装起来,而且使它们还可以相互替换。策略模式让算法独立于使用它的客户而独立变化。Android中最典型的的策略设计模式是动画插值器的使用,具体怎么使用的,将是本文所重点所写的内容。1、UML类图Context:用来操作策略的上下文环境。Strategy:策略的抽象。ConcreteStrategyA、ConcreteStrategyB:具体的策略实现。2、

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK