当前位置: 首页>>代码示例>>Java>>正文


Java ViewAction.getDescription方法代码示例

本文整理汇总了Java中android.support.test.espresso.ViewAction.getDescription方法的典型用法代码示例。如果您正苦于以下问题:Java ViewAction.getDescription方法的具体用法?Java ViewAction.getDescription怎么用?Java ViewAction.getDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.test.espresso.ViewAction的用法示例。


在下文中一共展示了ViewAction.getDescription方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: withCustomConstraints

import android.support.test.espresso.ViewAction; //导入方法依赖的package包/类
/**
 * From: http://stackoverflow.com/questions/33505953/espresso-how-to-test-swiperefreshlayout/33516360#33516360
 * <p>
 * ViewPager will throw an error if not 90% of it is displayed. This reduces the restriction.
 *
 * @param action      Action to be done.
 * @param constraints Restrictions on the view.
 * @return Performs an action on the view.
 */
public static ViewAction withCustomConstraints(final ViewAction action, final Matcher<View> constraints)
{
    return new ViewAction()
    {
        @Override
        public Matcher<View> getConstraints()
        {
            return constraints;
        }

        @Override
        public String getDescription()
        {
            return action.getDescription();
        }

        @Override
        public void perform(UiController uiController, View view)
        {
            action.perform(uiController, view);
        }
    };
}
 
开发者ID:jbmlaird,项目名称:DiscogsBrowser,代码行数:33,代码来源:TestUtils.java

示例2: withCustomConstraints

import android.support.test.espresso.ViewAction; //导入方法依赖的package包/类
public static ViewAction withCustomConstraints(final ViewAction action, final Matcher<View> constraints) {
    return new ViewAction() {
        @Override
        public Matcher<View> getConstraints() {
            return constraints;
        }

        @Override
        public String getDescription() {
            return action.getDescription();
        }

        @Override
        public void perform(UiController uiController, View view) {
            action.perform(uiController, view);
        }
    };
}
 
开发者ID:mozilla-mobile,项目名称:firefox-tv,代码行数:19,代码来源:PullDownToRefreshTest.java

示例3: withCustomConstraints

import android.support.test.espresso.ViewAction; //导入方法依赖的package包/类
public static ViewAction withCustomConstraints(final ViewAction action, final Matcher<View> constraints) {
  return new ViewAction() {
    @Override
    public Matcher<View> getConstraints() {
      return constraints;
    }

    @Override
    public String getDescription() {
      return action.getDescription();
    }

    @Override
    public void perform(UiController uiController, View view) {
      action.perform(uiController, view);
    }
  };
}
 
开发者ID:xmartlabs,项目名称:bigbang,代码行数:19,代码来源:ViewActions.java

示例4: withCustomConstraints

import android.support.test.espresso.ViewAction; //导入方法依赖的package包/类
/** Overwrites the constraints of the specified {@link ViewAction}. */
public static ViewAction withCustomConstraints(
    final ViewAction action, final Matcher<View> constraints) {
  return new ViewAction() {
    @Override
    public Matcher<View> getConstraints() {
      return constraints;
    }

    @Override
    public String getDescription() {
      return action.getDescription();
    }

    @Override
    public void perform(UiController uiController, View view) {
      action.perform(uiController, view);
    }
  };
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:21,代码来源:DesignViewActions.java


注:本文中的android.support.test.espresso.ViewAction.getDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。