public void hideSoftKeyboard()Hides the soft keyboard。
unlockScreen
public void unlockScreen()Unlocks the lock screen。sendKey
public void sendKey(int key)Sends a key: Right, Left, Up, Down, Enter, Menu or Delete。Parameters:key - the key to be sent。 Use Solo。RIGHT, LEFT, UP, DOWN, ENTER, MENU, DELETEgoBackToActivity
public void goBackToActivity(String name)Returns to an Activity matching the specified name。Parameters:name - the name of the Activity to return to。 Example is: "MyActivity"waitForActivity
public boolean waitForActivity(String name)Waits for an Activity matching the specified name。 Default timeout is 20 seconds。Parameters:name - the name of the Activity to wait for。
Example is: "MyActivity"Returns:true if Activity appears before the timeout and false if it does notwaitForActivity
public boolean waitForActivity(String name, int timeout)Waits for an Activity matching the specified name。Parameters:name - the name of the Activity to wait for。 Example is: "MyActivity"timeout - the amount of time in milliseconds to waitReturns:true if Activity appears before the timeout and false if it does notwaitForActivity
public boolean waitForActivity(Class<? extends android.app.Activity> activityClass)Waits for an Activity matching the specified class。 Default timeout is 20 seconds。Parameters:activityClass - the class of the Activity to wait for。
Example is: MyActivity。classReturns:true if Activity appears before the timeout and false if it does notwaitForActivity
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/ruanjian/article-37529-36.html
人若犯我