Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create methods to avoid knowing the ID of the ViewPager if there's only one ViewPager #58

Merged
merged 8 commits into from
May 11, 2017

Conversation

rocboronat
Copy link
Member

The original idea? Look here! #8

Copy link
Member

@Sloy Sloy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome idea!


@NonNull
public static Matcher<View> displayedAssignableFrom(final Class<? extends View> clazz) {
return allOf(isDisplayed(), isAssignableFrom(clazz));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: A nice trick to avoid the ugly clazz hack is telling what it's for. Like viewClass.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Actually, I copied it from the original isAssignableFrom method... but your idea is better :·)

@@ -31,6 +31,8 @@ dependencies {
}
compile 'com.android.support.test.uiautomator:uiautomator-v18:2.1.2'
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.android.support:support-core-ui:25.1.0'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q: Why is this new dependency for?

Copy link
Member Author

@rocboronat rocboronat May 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For ViewPager 😮

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaaaah I get it now.
Thanks!

@rocboronat rocboronat merged commit e379a39 into master May 11, 2017
@rocboronat rocboronat deleted the avoid-id-on-viewpager-methods branch May 11, 2017 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants