Android Open Source - Skeleton Presenter






From Project

Back to project page Skeleton.

License

The source code is released under:

Apache License

If you think the Android project Skeleton 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.gordon.skeleton.presenters;
/* w  w  w .jav  a  2 s.c o m*/
/**
 * Created by kg on 10/27/14.
 */
public abstract class Presenter<T> {

    protected abstract void updateViews();

    protected T view;

    public Presenter<T> setView(T screen) {
        this.view = screen;
        requestViewUpdate();
        return this;
    }

    public void removeView() {
        view = null;
    }

    protected void requestViewUpdate() {
        if (isViewReady()) {
            updateViews();
        }
    }

    private boolean isViewReady() {
        return view != null;
    }
}




Java Source Code List

com.gordon.skeleton.ApplicationTest.java
com.gordon.skeleton.SkeletonActivity.java
com.gordon.skeleton.annotations.AnnotationHelper.java
com.gordon.skeleton.annotations.LayoutHelper.java
com.gordon.skeleton.annotations.MenuLayout.java
com.gordon.skeleton.containers.Container.java
com.gordon.skeleton.flow.FlowBundler.java
com.gordon.skeleton.flow.GsonParcer.java
com.gordon.skeleton.presenters.Presenter.java
com.gordon.skeleton.screens.ScreenManager.java
com.gordon.skeleton.screens.ScreenSwitcher.java
com.gordon.skeleton.screens.Screen.java
com.gordon.skeleton.utils.SkeletonDialog.java