Code example for Button

Methods: isFocused

    public void testGoingRightFromLeftButtonJumpsOverCenterToRight() { 
        assertTrue("right button should be focused", mRightButton.isFocused());
    public void testGoingLeftFromRightButtonGoesToCenter()  { 
        // Give right button focus by having it request focus.  We post it 
        // to the UI thread because we are not running on the same thread, and 
        // any direct api calls that change state must be made from the UI thread. 
        // This is in contrast to instrumentation calls that send events that are 
        // processed through the framework and eventually find their way to 
        // affecting the ui thread. 
        getActivity().runOnUiThread(new Runnable() {
            public void run() {