本文整理汇总了Java中com.android.chimpchat.core.TouchPressType.DOWN_AND_UP属性的典型用法代码示例。如果您正苦于以下问题:Java TouchPressType.DOWN_AND_UP属性的具体用法?Java TouchPressType.DOWN_AND_UP怎么用?Java TouchPressType.DOWN_AND_UP使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.android.chimpchat.core.TouchPressType
的用法示例。
在下文中一共展示了TouchPressType.DOWN_AND_UP属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: press
@MonkeyRunnerExported(doc = "Send a key event to the specified key",
args = { "name", "type" },
argDocs = { "the keycode of the key to press (see android.view.KeyEvent)",
"touch event type as returned by TouchPressType(). To simulate typing a key, " +
"send DOWN_AND_UP"})
public void press(String name, String touchType) {
// The old docs had this string, and so in favor of maintaining
// backwards compatibility, let's special case it to the new one.
if (touchType.equals("DOWN_AND_UP")){
touchType = "downAndUp";
}
TouchPressType type = TouchPressType.fromIdentifier(touchType);
if (type == null) {
LOG.warning(String.format("Invalid TouchPressType specified (%s) default used instead",
touchType));
type = TouchPressType.DOWN_AND_UP;
}
impl.press(name, type);
}
示例2: touch
public void touch(int x, int y, String typeStr) {
TouchPressType type = TouchPressType.fromIdentifier(typeStr);
if (type == null)
type = TouchPressType.DOWN_AND_UP;
impl.touch(x, y, type);
}
示例3: touch
public void touch(int x, int y, String typestr) {
TouchPressType type = TouchPressType.fromIdentifier(typestr);
if (type == null)
type = TouchPressType.DOWN_AND_UP;
impl.touch(x, y, type);
}
示例4: press
public void press(String name, String typestr) {
TouchPressType type = TouchPressType.fromIdentifier(typestr);
if (type == null)
type = TouchPressType.DOWN_AND_UP;
impl.press(name, type);
}