FileDocCategorySizeDatePackage
ButtonActivityTest.javaAPI DocAndroid 1.5 API1891Wed May 06 22:42:02 BST 2009com.android.imftest.samples

ButtonActivityTest

public class ButtonActivityTest extends ImfBaseTestCase

Fields Summary
public final String
TAG
Constructors Summary
public ButtonActivityTest()

	
      
        super(ButtonActivity.class);
    
Methods Summary
public voidtestButtonActivatesIme()

       
        final Button button = (Button) mTargetActivity.findViewById(ButtonActivity.BUTTON_ID);
        
        // Push button
        // Bring the target EditText into focus.
        mTargetActivity.runOnUiThread(new Runnable() {
            public void run() {
                button.requestFocus();
            }
        });
        
        sendKeys(KeyEvent.KEYCODE_DPAD_CENTER);
        
        // Give it a couple seconds
        pause(2000);
        
        // We should have initialized imm.mServedView and imm.mCurrentTextBoxAttribute
        assertTrue(mImm.isActive());
        // imm.mServedInputConnection should be null since Button doesn't override onCreateInputConnection().
        assertFalse(mImm.isAcceptingText());
        
        destructiveCheckImeInitialState(mTargetActivity.getRootView(), button);