Back to project page Aviary-Android-SDK.
The source code is released under:
AVIARY API TERMS OF USE Full Legal Agreement The following terms and conditions and the terms and conditions at http://www.aviary.com/terms (collectively, the ?Terms??) govern your use of any and ...
If you think the Android project Aviary-Android-SDK 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.aviary.android.feather.effects; /* w w w. jav a2s . c o m*/ public class SimpleStatusMachine { public static int INVALID_STATUS = -1; private int currentStatus = INVALID_STATUS; private int previousStatus = INVALID_STATUS; private OnStatusChangeListener mStatusListener; public void setOnStatusChangeListener( OnStatusChangeListener listener ) { mStatusListener = listener; } public void setStatus( int newStatus ) { if ( newStatus != currentStatus ) { previousStatus = currentStatus; currentStatus = newStatus; if ( null != mStatusListener ) { mStatusListener.OnStatusChanged( previousStatus, currentStatus ); } } else { if ( null != mStatusListener ) { mStatusListener.OnStatusUpdated( newStatus ); } } } public int getCurrentStatus() { return currentStatus; } public static interface OnStatusChangeListener { public void OnStatusChanged( int oldStatus, int newStatus ); public void OnStatusUpdated( int status ); } }