Android Open Source - 50AndroidHacks Splash Presenter






From Project

Back to project page 50AndroidHacks.

License

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.

Java Source Code

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;
        }
    }
}




Java Source Code List

com.github.yftx.AndroidHacks.MainActivity.java
com.github.yftx.AndroidHacks.sectionAdapter.AdapterActivity.java
com.github.yftx.AndroidHacks.sectionAdapter.SampleAdapter.java
com.github.yftx.AndroidHacks.sectionAnimation.KenBurnsEffect.java
com.github.yftx.AndroidHacks.sectionAnimation.TextAndImageAnimation.java
com.github.yftx.AndroidHacks.sectionLayout.CanvasActivity.java
com.github.yftx.AndroidHacks.sectionLayout.WeightActivity.java
com.github.yftx.AndroidHacks.sectionLayout.customview.Cascade.java
com.github.yftx.AndroidHacks.sectionLayout.customview.CustomCard.java
com.github.yftx.AndroidHacks.sectionPatterns.broadcast.BroadcastReceiverActivity.java
com.github.yftx.AndroidHacks.sectionPatterns.broadcast.MyService.java
com.github.yftx.AndroidHacks.sectionPatterns.mvp.model.IOpenStatus.java
com.github.yftx.AndroidHacks.sectionPatterns.mvp.model.impl.OpenStatus.java
com.github.yftx.AndroidHacks.sectionPatterns.mvp.presenter.SplashPresenter.java
com.github.yftx.AndroidHacks.sectionPatterns.mvp.view.ISplashView.java
com.github.yftx.AndroidHacks.sectionPatterns.mvp.view.impl.SplashActivity.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.FormatTextView.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.GlowTextView.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.LEDTextView.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.NoBgPhoneWindow.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.ScreenOrientation.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.TestFragmentAdapter.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.TestFragment.java
com.github.yftx.AndroidHacks.sectionTipsAndTricks.ToastPostion.java