Back to project page 50AndroidHacks.
The source code is released under:
Apache License
If you think the Android project 50AndroidHacks listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.yftx.AndroidHacks.sectionPatterns.mvp.presenter; //from w ww . j a va 2 s . c o m import com.github.yftx.AndroidHacks.sectionPatterns.mvp.model.IOpenStatus; import com.github.yftx.AndroidHacks.sectionPatterns.mvp.model.impl.OpenStatus; import com.github.yftx.AndroidHacks.sectionPatterns.mvp.view.ISplashView; /** * User: Liuzl * Date: 13-11-28 */ public class SplashPresenter { private IOpenStatus mOpenStatus; private ISplashView mView; public SplashPresenter() { this(new OpenStatus()); } public SplashPresenter(IOpenStatus openStatus) { mOpenStatus = openStatus; } public void setView(ISplashView view) { this.mView = view; } protected ISplashView getView() { return mView; } public void refresh(IOpenStatus.Type type){ mOpenStatus.setViewType(type); handleRefresh(); } public void handleRefresh() { switch (mOpenStatus.getViewType()){ case Normal: mView.showNormal(); break; case Small: mView.showSmall(); break; case Big: mView.showBig(); break; } } }