FileDocCategorySizeDatePackage
StartInTouchWithViewInFocusTest.javaAPI DocAndroid 5.1 API2506Thu Mar 12 22:22:12 GMT 2015android.widget.touchmode

StartInTouchWithViewInFocusTest

public class StartInTouchWithViewInFocusTest extends android.test.ActivityInstrumentationTestCase2

Fields Summary
private android.widget.EditText
mEditText
private android.widget.Button
mButton
Constructors Summary
public StartInTouchWithViewInFocusTest()

        super("com.android.frameworks.coretests", LLEditTextThenButton.class);
    
Methods Summary
public voidDISABLE_testKeyDownLeavesTouchModeAndGoesToNextView()

        assertNotInTouchModeAfterKey(this, KeyEvent.KEYCODE_DPAD_DOWN, mEditText);
        assertFalse("should have left touch mode", mEditText.isInTouchMode());
        assertTrue("should have given focus to next view", mButton.isFocused());
    
public voidDISABLE_testNonDirectionalKeyExitsTouchMode()

        assertNotInTouchModeAfterKey(this, KeyEvent.KEYCODE_A, mEditText);
        assertFalse("should have left touch mode", mEditText.isInTouchMode());
        assertTrue("edit text should still have focus", mEditText.isFocused());        
    
protected voidsetUp()

        super.setUp();
        this.setActivityInitialTouchMode(true);
        mEditText = getActivity().getEditText();
        mButton = getActivity().getButton();
    
public voidtestPreconditions()

        assertTrue("should start in touch mode", mEditText.isInTouchMode());
        assertTrue("edit text is focusable in touch mode, should have focus", mEditText.isFocused());