// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_BOTTOM = 3;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_LEFT = 0;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_RIGHT = 2;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_TOP = 1;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int NO_DRAWABLE = -1;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static boolean drawableMatches(final View view, final Drawable drawable, @DrawableRes final int expectedId) {
//   final boolean isVisible = view.getVisibility() == VISIBLE;
// 
//   if (expectedId == NO_DRAWABLE) {
//     return isVisible && drawable == null;
//   }
// 
//   final Context context = view.getContext();
//   return isVisible && checkNotNull(drawable.getConstantState(), "constantState == null").equals(ContextCompat.getDrawable(context, expectedId).getConstantState());
// }


import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.graphics.drawable.Drawable;
import androidx.annotation.CheckResult;
import androidx.annotation.DrawableRes;
import androidx.test.espresso.matcher.BoundedMatcher;
import android.view.View;
import android.widget.TextView;
import org.hamcrest.Description;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_BOTTOM;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_LEFT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_BOTTOM;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_LEFT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_RIGHT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_TOP;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RIGHT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_TOP;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_BOTTOM;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_LEFT;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_RIGHT;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_TOP;
import static com.vanniktech.espresso.core.utils.Utils.NO_DRAWABLE;
import static com.vanniktech.espresso.core.utils.Utils.drawableMatches;
    return new TextViewDrawableMatcher(resourceId, DRAWABLE_BOTTOM);
  }

  /**
   * Matches that there is no bottom drawable.
   *
   * <p>Example usage:</p>
   * <code>onView(withId(R.id.view)).check(matches(withNoTextViewDrawableBottom()));</code>
   */
  @CheckResult public static TextViewDrawableMatcher withNoTextViewDrawableBottom() {
    return new TextViewDrawableMatcher(NO_DRAWABLE, DRAWABLE_BOTTOM);
  }

  /**
   * Matches that the given drawable is displayed as the relative bottom drawable.
   *
   * <p>Example usage:</p>
   * <code>onView(withId(R.id.view)).check(matches(withTextViewDrawableRelativeBottom(R.color.blue)));</code>
   */
  @CheckResult @TargetApi(JELLY_BEAN_MR1) public static TextViewDrawableMatcher withTextViewDrawableRelativeBottom(@DrawableRes final int resourceId) {
    return new TextViewDrawableMatcher(resourceId, DRAWABLE_RELATIVE_BOTTOM);
  }

  /**
   * Matches that there is no relative bottom drawable.
   *
   * <p>Example usage:</p>
   * <code>onView(withId(R.id.view)).check(matches(withNoTextViewDrawableRelativeBottom()));</code>
   */
  @CheckResult @TargetApi(JELLY_BEAN_MR1) public static TextViewDrawableMatcher withNoTextViewDrawableRelativeBottom() {
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_BOTTOM = 3;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_LEFT = 0;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_RIGHT = 2;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int INDEX_TOP = 1;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static final int NO_DRAWABLE = -1;
// 
// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/Utils.java
// static boolean drawableMatches(final View view, final Drawable drawable, @DrawableRes final int expectedId) {
//   final boolean isVisible = view.getVisibility() == VISIBLE;
// 
//   if (expectedId == NO_DRAWABLE) {
//     return isVisible && drawable == null;
//   }
// 
//   final Context context = view.getContext();
//   return isVisible && checkNotNull(drawable.getConstantState(), "constantState == null").equals(ContextCompat.getDrawable(context, expectedId).getConstantState());
// }


// Path: espresso-core-utils/src/main/java/com/vanniktech/espresso/core/utils/TextViewDrawableMatcher.java
import android.annotation.SuppressLint;
import android.annotation.TargetApi;
import android.graphics.drawable.Drawable;
import androidx.annotation.CheckResult;
import androidx.annotation.DrawableRes;
import androidx.test.espresso.matcher.BoundedMatcher;
import android.view.View;
import android.widget.TextView;
import org.hamcrest.Description;
import static android.os.Build.VERSION_CODES.JELLY_BEAN_MR1;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_BOTTOM;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_LEFT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_BOTTOM;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_LEFT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_RIGHT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RELATIVE_TOP;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_RIGHT;
import static com.vanniktech.espresso.core.utils.TextViewDrawableMatcher.Type.DRAWABLE_TOP;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_BOTTOM;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_LEFT;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_RIGHT;
import static com.vanniktech.espresso.core.utils.Utils.INDEX_TOP;
import static com.vanniktech.espresso.core.utils.Utils.NO_DRAWABLE;
import static com.vanniktech.espresso.core.utils.Utils.drawableMatches;

    return new TextViewDrawableMatcher(resourceId, DRAWABLE_BOTTOM);
  }

  /**
   * Matches that there is no bottom drawable.
   *
   * <p>Example usage:</p>
   * <code>onView(withId(R.id.view)).check(matches(withNoTextViewDrawableBottom()));</code>
   */
  @CheckResult public static TextViewDrawableMatcher withNoTextViewDrawableBottom() {
    return new TextViewDrawableMatcher(NO_DRAWABLE, DRAWABLE_BOTTOM);
  }

  /**
   * Matches that the given drawable is displayed as the relative bottom drawable.
   *
   * <p>Example usage:</p>
   * <code>onView(withId(R.id.view)).check(matches(withTextViewDrawableRelativeBottom(R.color.blue)));</code>
   */
  @CheckResult @TargetApi(JELLY_BEAN_MR1) public static TextViewDrawableMatcher withTextViewDrawableRelativeBottom(@DrawableRes final int resourceId) {
    return new TextViewDrawableMatcher(resourceId, DRAWABLE_RELATIVE_BOTTOM);
  }

  /**
   * Matches that there is no relative bottom drawable.
   *
   * <p>Example usage:</p>
   * <code>onView(withId(R.id.view)).check(matches(withNoTextViewDrawableRelativeBottom()));</code>
   */
  @CheckResult @TargetApi(JELLY_BEAN_MR1) public static TextViewDrawableMatcher withNoTextViewDrawableRelativeBottom() {
    return new TextViewDrawableMatcher(NO_DRAWABLE, DRAWABLE_RELATIVE_BOTTOM);