Android Open Source - InputHandlerTest Base Input Handler






From Project

Back to project page InputHandlerTest.

License

The source code is released under:

Apache License

If you think the Android project InputHandlerTest 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.mikedg.glass.control.inputhandler;
/*  ww  w.  j  av  a  2s  .  co  m*/
/**
 * Created by Michael on 2/28/14.
 */
public abstract class BaseInputHandler implements InputHandler {
    private OnStateChangedListener mOnStateChangedListener;
    private OnStateChangedListener.State mLastState = OnStateChangedListener.State.NOT_READY;

    @Override
    public void select() {

    }

    @Override
    public void left() {

    }

    @Override
    public void right() {

    }

    @Override
    public void back() {

    }

    @Override
    public void setOnStateChangedListener(OnStateChangedListener onStateChangedListener) {
        mOnStateChangedListener = onStateChangedListener;
        mOnStateChangedListener.onStateChanged(mLastState);
    }

    public void onStateChanged(OnStateChangedListener.State state) {
        if (mOnStateChangedListener != null) {
            mOnStateChangedListener.onStateChanged(state);
        }
        mLastState = state;
    }
}




Java Source Code List

com.mikedg.android.glass.inputhandlertest.MainActivity.java
com.mikedg.glass.control.L.java
com.mikedg.glass.control.ProcessUtility.java
com.mikedg.glass.control.inputhandler.AdbTcpInputHandler.java
com.mikedg.glass.control.inputhandler.BaseInputHandler.java
com.mikedg.glass.control.inputhandler.InputHandler.java
com.mikedg.glass.control.inputhandler.OnStateChangedListener.java