Back to project page Skeleton.
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.
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; } }