FileDocCategorySizeDatePackage
StartInTouchWithViewInFocusTest.javaAPI DocAndroid 1.5 API2539Wed May 06 22:42:02 BST 2009com.android.frameworktest.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.frameworktest", 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());