當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。